Welcome, Guest

i have made some changes
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: i have made some changes

i have made some changes 2 years, 4 months ago #1493

first i would like to say i have found your plugin quite useful! this is a much more flexible option than the built in {loadposition } plugin.

the one thing i have had a problem with is having the module load the chrome skin that i sometimes need. i have adjusted your code to make it possible and i thought i would share

in /plugins/module.php the foreach statement is changed to become the following:
foreach ($matches as $match){   		
		$module = '';
		$arguments = array();   		
		preg_match_all('/\[.*?\]/', $match[2], $arguments);		
		if ($arguments){
			foreach ($arguments as $i=>$argument){
				$module = preg_replace("/\[|]/", '', $argument);
				$moduleargs= explode("|",$module[0]);
			}
		}		
			
		$module_id = $moduleargs[0];	
		//$module_class = $module[1];
		if($moduleargs[2])
			$module_class = $moduleargs[2];
		else
			$module_class = 0;
		//$module_style = $module[2];
		if($moduleargs[1])
			$module_style = $moduleargs[1];
		else
			$module_style = 0;		
		
		$module_output = $plugin_module_class->load_module($module_id, $module_class, $module_style);		
			
		$row->text = preg_replace($regex, $module_output, $row->text, 1);
	} 


you will see that now we can put something like this:

{module [33|rounded|-hilite]}

33 == moudule id
rounded == chrome skin (optional)
-hilite == module class suffix (optional, but the above are required to use this) also a note, it appears to still pull the suffix from the module manager, not from this... so perhaps i don't understand the fuction of $module_style...

so we now have ultimate flexibility. i hope this is useful to you, and you are welcome to update your plugin with this code. Credit to Jonathan Stanley in the source code would be appreciated, but not required

thanks for the plugin!
Last Edit: 2 years, 4 months ago by yourmanstan.

Re:i have made some changes 2 years, 4 months ago #1496

Thank you very much.
I will put the code in and you will get the credit. It will be in the next release. Mail me your url if you want me to link to you.
Thanks.

Re:i have made some changes 1 year, 8 months ago #3085

I finally remembered I wanted to integrate this. The plugin code is working, but the module chrome is not rendering. Did you also make changes to the plugin class (module_class.php) ?

Re:i have made some changes 1 year, 7 months ago #3220

I am happy to announce that the chrome-select is integrated in this plugin (as of version 2) for Joomla 1.6.
see here:
www.pages-and-items.com/extensions/plugin-module-in-article
  • Page:
  • 1
Time to create page: 1.11 seconds
 
Follow Us On Twitter