Module Plugin on PyroCMS is not loading - codeigniter

I have created a module that works on the administrator and public side. On the public side, I want to have a plugin for certain parts which I can put into the pages.
I have done this but it doesn't load after putting in {pyro:properties:rental}
Here is the code in /addons/modules/properties/plugin.php.
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Plugin_Properties extends Plugin
{
function rental()
{
$rentalForm = '<div class="search_full">
<div class="container_12">
<div class="grid_12">
<h1>Rental Search</h1>
</div>
<form action="" method="post">
<div class="grid_4">
<h2 class="liberationtext">Choose your destination</h2>
<label for="region">Region</label>
</div>
</form>
</div>
</div>';
return $rentalForm;
}
}
The module is called properties and the plugin just returns some HTML to display.
When I look at the log, it says ERROR - 2011-05-18 13:53:57 --> Unable to load: properties
I made this into a plugin (in the plugins folder) and it worked fine when I called it. I'm not sure what to do. Any help would be good.

I still a beginner in pyrocms but all seems correct implementing this modular plugin.
pyro tag {pyro:properties:rental} it's OK
file container /addons/modules/properties/plugin.php. it's OK
Code in plugin file it's OK
So the problem must be triggered in another part.
A very useful answer that mention modular plugins in Pyrocms module or widget or plugin

With this:
{{properties:rental}}
{{/properties:rental}}
you will see the search_full div output.

Use this
{{properties:rental}}
you don't need to close it
{{/properties:rental}}
Pyrocms developing-plugins

Related

Laravel 8 Livewire wire:click:prevent Not Working

Please Someone please I am in the middle of my final year project but this is not working I am trying for 3 days I am new so I don't know how to ask a question so if you need something please ask me Thanks
This is the view for Shop and i have used Composer require Hardevine/shoppingcart
This is the ShopComponent for Shop
When I ran Laravel 8 on IIS, I had a similar problem. The problem was that the browser couldn't access some of the livewire js files, and the solution was:
Go to D:\Projects\Laravel\laravel8ecommerce\vendor\livewire\livewire\config\livewire.php
and set
'asset_url' => "your_url",
and the problem was disappeared.
I had same problem. To solve this issue what I did was enclose my blade template files with a <div> containing an id="main" like so:
<div id="main">
your blade template code
<div>
Instead Of This
wire:click:prevent=“store({{$product->id}},’{{$product->name}}’,{{$product->regular_price}})”
You need to use this in your blade file
#livewireStyles
your code will be in this area
#livewireScripts
Try This For Calling Store Function
wire:click.prevent="store({{$product->id}},{{$product->name}},{{$product->regular_price}})”
Or
wire:click="store({{$product->id}},{{$product->name}},{{$product->regular_price}})”
My solution was based on #KumTem answer
Inside the livewire blades located at app\resources\views\livewire\sample_blade.php
<div id="main">
... templates here
</div>

Broken html script - does Incapsula change the html tags positions?

I am using Magento2 with fpc, varnish, redis and Incapsula, and I am facing a very strange behaviour for a broken html content. I have a phtml file containing some php followed by javascript as follows:
<div class="some-class">
<!--html -->
</div>
<script>
//...
$element.wrap('<div class="red"></div>');
//..
</script>
In a parent template (also phtml file), this file is being included using php include (yes this is how a Magento core module including it without using blocks) as:
<?php include 'path/to/file.phtml'; ?>
The problem is that on the page source I am getting the following unexpected html:
<div class="some-class">
<!--html -->
</div>
<script>
//...
$element.wrap('<div class="red"></script></div>');
//..broken content here due to the moved script tag
Notice the moved ending tag ..
I know that this scenario can happen due to several issues, but I am suspecting Incapsula because its being used by the only environment where the issue occurs
Please suggest possible scenarios related to caching, any help or idea is appreciated.
Thanks
Try to use this way to echo other phtml in phtml.
<?php
echo $block->getLayout()
->createBlock("Magento\Framework\View\Element\Template")
->setTemplate("Your_Module::file.phtml")
->toHtml();
?>

How to add background image at the login page?

so there is this project iam working on..now i want to add a background image at the login page....i have tried to upload the photo on the public/background folder...then in the css file i have created the directory but so far no changes!!
now my project look like below ..i have uploaded an image named backgroung.jpg on background folder but also in public/background and /public_html/vendors/gauge.js/assets then at my css file html {
background_image:url('public/background/background.jpg')} so far no changes
accountant
app
background
bootstrap
build
config
css
customer
database
employee
garage
garragelogo
general_setting
img
js
.
.
.
html {
background_image:url('public/background/background.jpg')}
i expected a lot i guess help please ......
You need to specify your path relatively like this ../../../public/background/background.jpg which ../ is a backward directory
or you can set your background in your html tag like this
<html style="background: {{ asset('background/background.jpg') }}">
hope it helps
Use this code block for setting background image on any page.
<div class="classToDefineBackgroundSetCss" style="background-image: url('{{asset('assets/bg-slider/bg-slider1.jpg')}}');">
<form>
<!-- LOGIN FORM -->
</form>
</div>

Accessing PyroCMS Module inside Custom Theme

I have designed a custom theme and I need to be able to load a module I have made into my default.html page. I have written the following so far:
<div id="outer-content">
<div id="content">
{{ template:body }}
</div>
</div>
What do I replace {{ template:body }} with in order to display a custom module?
Maybe this will help.
In your theme, save your default.html file with the same name as your module. For example, you can create a custom layout file for the blog and save it as blog.html. When the module gets called it uses the layout file with the same name as your module.
If thats not an answer for you try posting on the PyroCMS Modules forum.

AJAX Wordpress Site with Difficult URL settings

On this WordPress theme utilizing AJAX, proves to be difficult. The developer of the theme cannot seem to find the issue or solution to it.
This site runs beautifully, if, and only IF, you type is this complete URL "http://www.geigerandwood.com/#!//" if you type in the .com site alone, it will appear but will be disfunctional.
I have made attempts in 301 redirects, even creating a static page with a redirect but still no luck. Is there something that I can add or change in the code to make this work properly?
FYI - it has been tested on the common web browsers on both OSX & Windows.
Here is a video of my presented issue. http://www.screenr.com/D1G8
What theme do you use?
My quick examination of your page source code is that I only can find something related to the #!// is in here
<div id="contentBoxScroll">
<a id="closeButton" href="#!//"></a>
<div class="dragcontainer">
<div id="contentBoxScrollDragger" class="dragger">
<div class="scroll_up"></div>
<div class="scroll_down"></div>
</div>
</div>
</div>
I assume it must be something inside the script from which that HTML is generated. I can say more since I can't see the full source.

Resources