New problem with PHP plugin

16 years 7 months ago #2546 by Arnaud
Here is what I have in my Firebug Console. Hope this can help !

Please Log in or Create an account to join the conversation.

16 years 6 months ago #2639 by Arnaud
1 month later, Emir, and i'm still waiting for your support !!  >:(

Please Log in or Create an account to join the conversation.

16 years 6 months ago - 16 years 6 months ago #2641 by Saka
Hi Arnaud,

Unfortunatelly something like this is not supported. What you are trying to do is to modify the behavior of the module by dynamically filtering the results. This is not supported by the module. Also, you can't make a plugin to use the query string like you wanted because of the way the AJAX works. The query string of the site request is not the same as the query string passed when asyncronously requesting the module content. If you use Firebug you will be able to see that. So you can't pass information to the module with query string of the page.

What you can do is to filter the results by variables that are sent by module's API to the plugin's get_content() function, for example by $option or $selectedid. For example, you could look up the catid for the id of the article that's been selected ($selectedid) and then display only the articles that belong to its category.

It took a while until I understood what you are trying to do so it's good that you did setup a test page for me.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

16 years 6 months ago #2644 by Arnaud
Hi Emir !

Thanks for your reply. However, when debug mode is activated the content is well filtered and I can see it in $content variable. So, data selection is well done ! The problem is when I want to show it... If $content contain the data why the API is not able to show it ??

Please Log in or Create an account to join the conversation.

16 years 6 months ago #2646 by Saka
Which debug mode?
Data selection is impossible with your $cat variable because it's not passed in the query string. Only if you hardcoded it you might have filtered the data.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

16 years 6 months ago #2655 by Arnaud
Debug mode :
echo "<pre> content : "; var_export($content);

Uncomment this line in my PHP plugin in place of :
return $content;

For your information Emir, my variable is well passed in the query string cause, as I previously said, in debug mode i can see my filtered content !

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch