Note that there are some explanatory texts on larger screens.

plurals
  1. POCall a custom module helper from template file of another module
    primarykey
    data
    text
    <p>I have created an new module. The module is connected with another database. Now I want to call the helper class from another module template file let say "description.pthml". I used the following code.</p> <pre><code>$_helper = $this-&gt;helper('ForumProdPosts/output'); </code></pre> <p>But I am getting error "Fatal error: Class 'Mage_ForumProdPosts_Helper_Output' not found in /home/black/public_html/app/Mage.php on line 546".</p> <p>The helper class is located in local/MyWebsite/ForumProdPosts/Helper/Output.php having the following code.</p> <pre><code>class MyWebsite_ForumProdPosts_Helper_Output extends Mage_Core_Helper_Abstract { /** * Constructor */ public function __construct() { Mage::dispatchEvent('forumprodposts_helper_output_construct', array('helper'=&gt;$this)); } public function getForumPosts(){ echo "I m here"; exit; } } </code></pre> <p>Also the config.xml of my module is </p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;MyWebsite_ForumProdPosts&gt; &lt;version&gt;0.1.0&lt;/version&gt; &lt;/MyWebsite_ForumProdPosts&gt; &lt;/modules&gt; &lt;frontend&gt; &lt;routers&gt; &lt;forumprodposts&gt; &lt;use&gt;standard&lt;/use&gt; &lt;args&gt; &lt;module&gt;MyWebsite_ForumProdPosts&lt;/module&gt; &lt;frontName&gt;forumprodposts&lt;/frontName&gt; &lt;/args&gt; &lt;/forumprodposts&gt; &lt;/routers&gt; &lt;layout&gt; &lt;updates&gt; &lt;forumprodposts&gt; &lt;file&gt;forumprodposts.xml&lt;/file&gt; &lt;/forumprodposts&gt; &lt;/updates&gt; &lt;/layout&gt; &lt;/frontend&gt; &lt;global&gt; &lt;helpers&gt; &lt;forumprodposts&gt; &lt;class&gt;MyWebsite_ForumProdPosts_Helper&lt;/class&gt; &lt;/forumprodposts&gt; &lt;/helpers&gt; &lt;resources&gt; &lt;forumprodposts_write&gt; &lt;connection&gt; &lt;use&gt;phpbb_database&lt;/use&gt; &lt;/connection&gt; &lt;/forumprodposts_write&gt; &lt;forumprodposts_read&gt; &lt;connection&gt; &lt;use&gt;phpbb_database&lt;/use&gt; &lt;/connection&gt; &lt;/forumprodposts_read&gt; &lt;forumprodposts_setup&gt; &lt;connection&gt; &lt;use&gt;core_setup&lt;/use&gt; &lt;/connection&gt; &lt;/forumprodposts_setup&gt; &lt;forumprodposts_database&gt; &lt;connection&gt; &lt;host&gt;&lt;![CDATA[localhost]]&gt;&lt;/host&gt; &lt;username&gt;&lt;![CDATA[user]]&gt;&lt;/username&gt; &lt;password&gt;&lt;![CDATA[password]]&gt;&lt;/password&gt; &lt;dbname&gt;&lt;![CDATA[forumdb]]&gt;&lt;/dbname&gt; &lt;model&gt;mysql4&lt;/model&gt; &lt;type&gt;pdo_mysql&lt;/type&gt; &lt;active&gt;1&lt;/active&gt; &lt;/connection&gt; &lt;/forumprodposts_database&gt; &lt;/resources&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>Seems to me the magento not recognizing my module. Help me what I am doing wrong.</p> <p>I have just realized that my module is not appearing in the configuration/advanced section of admin panel. I have done reindexing and clear cashe also the MyWebsite_ForumProdPosts.xml in etc/modules have the follwing code. </p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;MyWebsite_ForumProdPosts&gt; &lt;active&gt;true&lt;/active&gt; &lt;codePool&gt;local&lt;/codePool&gt; &lt;/MyWebsite_ForumProdPosts&gt; &lt;/modules&gt; &lt;/config&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload