Page 1 of 1

Using method of modules in atricles

Posted: Sat Mar 08, 2008 5:53 pm
by bigmantana
Hello,
How can I integrate an article with Joomla Methods and using PhP in articles too. My problem is related to activating a paypal button when the user LogIn. I can read the user status by PHP codes to shows the PAYPAL buttons but it seems the PHP codes cannot integrated with article environment even when I disable "Default WYSIWYG Editor"
Is there any ways to accomplish this task ?
Thx

Posted: Sat Mar 08, 2008 8:13 pm
by bigmantana
I found includePHP in extension manager which seems solve php embedding in articles.
I have a php question. I wanna call a method of a module in an article.
Suppose my module is mod_example and has a method getMe();
as I call mod_example::getMe() through the {php} tag I get error :
Fatal error: Class 'mod_example' not found in /home/test/public_html/plugins/content/includePHP.php(29) : eval()'d code on line 1.
In other world how can I define a global variable in my PHP modules. Is it possible?
Thank you.

Re: Using method of modules in atricles

Posted: Sat Mar 08, 2008 8:13 pm
by bigmantana
I also loaded my module by "loadposition" tag and then tried to used to the variables directly in {php} tags but again the scope of methods are not in my articles.