<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Modules — FUEL CMS Forum</title>
      <link>https://forum.getfuelcms.com/</link>
      <pubDate>Sat, 16 May 2026 15:11:04 +0000</pubDate>
          <description>Modules — FUEL CMS Forum</description>
    <language>en</language>
    <atom:link href="https://forum.getfuelcms.com/categories/modules/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Inline popup with multi and/or select2</title>
        <link>https://forum.getfuelcms.com/discussion/3661/inline-popup-with-multi-and-or-select2</link>
        <pubDate>Wed, 23 Aug 2023 16:58:28 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>almostcompletely</dc:creator>
        <guid isPermaLink="false">3661@/discussions</guid>
        <description><![CDATA[<p>I have an advanced module that I call from a simple module's record edit page. It pops up a form which I use form_builder to create (I have a button with the class="btn_field add_inline_button")</p>

<pre><code>$fields['newReferences']['label'] = 'Add these references';
$fields['newReferences']['type'] = 'multi';
$fields['newReferences']['options'] = $options;

$this-&gt;form_builder-&gt;set_fields($fields);
</code></pre>

<p>It seems that the "multi" field type does not get initialised to show the "supercomboselect" implementation of the field. I get a similar problem with select2 - it doesn't initialise.</p>

<p>Should I expect form_builder to initialise the fields?<br />
Should I expect it to work within a popup?<br />
Should I be adding js to the field to get it to initialise, if so what (for multi &amp; select2)?</p>

<p>Thanks.</p>
]]>
        </description>
    </item>
    <item>
        <title>Create new view with Fuel menus</title>
        <link>https://forum.getfuelcms.com/discussion/3660/create-new-view-with-fuel-menus</link>
        <pubDate>Mon, 17 Jul 2023 12:56:23 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>jsrts</dc:creator>
        <guid isPermaLink="false">3660@/discussions</guid>
        <description><![CDATA[<p>Hello,</p>

<p>I have recently started using Fuel CMS, and I would like to create a new view without a data model. Have checked the documentation, but cannot find how to do this.</p>

<p>I started a new project and after setup logged in, everything is working as expected.<br />
Then created a new advanced module with the command:<br />
<code>php index.php fuel/generate/advanced reports</code><br />
So, now I have a "Reports" entry in the left menu and a reports folder in the fuel/modules/ folder.</p>

<p>After this, I have created fuel/modules/reports/config files and fuel/modules/reports/views/report1.php<br />
I created a html form in report1.php and I can click on the report1 entry in Reports, in the left menu, to view it, but there are no Fuel menus or header, just the form on a white background.</p>

<p>Could only find this old example of a view with menus working, but in my new project I am getting php errors instead of the left menu entries and my form is not fully visible, as it is under the left menu.</p>

<p>This is my report1.php file:<br />
`&lt;?php
$this-&gt;load-&gt;module_view(FUEL_FOLDER, '_blocks/fuel_header');

// set some render variables based on what is in the panels array
$no_menu = (!$this-&gt;fuel-&gt;admin-&gt;has_panel('nav')) ? TRUE : FALSE;
$no_titlebar = (!$this-&gt;fuel-&gt;admin-&gt;has_panel('titlebar')) ? TRUE : FALSE;
$no_actions = (!$this-&gt;fuel-&gt;admin-&gt;has_panel('actions') OR empty($actions)) ? TRUE : FALSE;
$no_notification = (!$this-&gt;fuel-&gt;admin-&gt;has_panel('notification')) ? TRUE : FALSE;
?&gt;</p>

<p><br />
    </p><div>fuel-&gt;admin-&gt;ui_cookie('leftnav_hide') === '1') ? ' class="nav_hide"' : ''; ?&gt;&gt;<br />
        &lt;?php if ($this-&gt;fuel-&gt;admin-&gt;has_panel('top')) : ?&gt;<br />
            <br />
            &lt;?php $this-&gt;load-&gt;module_view(FUEL_FOLDER, '_blocks/fuel_top'); ?&gt;<br />
        &lt;?php endif; ?&gt;

<pre><code>    &lt;?php if ($this-&gt;fuel-&gt;admin-&gt;has_panel('nav')) : ?&gt;
        &lt;!-- LEFT MENU PANEL --&gt;
        &lt;?php $this-&gt;load-&gt;module_view(FUEL_FOLDER, '_blocks/nav'); ?&gt;
    &lt;?php endif; ?&gt;

    &lt;div id=&quot;fuel_main_panel&lt;?=($no_menu) ? '_compact' : ''?&gt;&quot;&gt;
        &lt;?php if ($this-&gt;fuel-&gt;admin-&gt;has_panel('titlebar')) : ?&gt;
            &lt;!-- BREADCRUMB/TITLE BAR PANEL --&gt;
            &lt;?php $this-&gt;load-&gt;module_view(REPORTS_FOLDER, '_blocks/titlebar_preactas')?&gt;
        &lt;?php endif; ?&gt;

        &lt;?php if ($this-&gt;fuel-&gt;admin-&gt;has_panel('actions') AND !empty($actions)) : ?&gt;
            &lt;!-- ACTION PANEL --&gt;
            &lt;div id=&quot;fuel_actions&quot;&gt;
                &lt;?php /* ?&gt;&lt;?=$this-&gt;form-&gt;open('action=&quot;'.$form_action.'&quot; method=&quot;post&quot; id=&quot;form_actions&quot; enctype=&quot;multipart/form-data&quot;')?&gt;&lt;?php */ ?&gt;
                &lt;?php if (!empty($actions)) : ?&gt;
                    &lt;?=$actions?&gt;
                &lt;?php endif; ?&gt;
                &lt;?php /* ?&gt;&lt;?=$this-&gt;form-&gt;close()?&gt;&lt;?php */ ?&gt;
            &lt;/div&gt;
        &lt;?php endif; ?&gt;

        &lt;?php if ($this-&gt;fuel-&gt;admin-&gt;has_panel('notification')) : ?&gt;
            &lt;!-- NOTIFICATION PANEL --&gt;
            &lt;div id=&quot;fuel_notification&quot; class=&quot;notification&quot;&gt;
                &lt;?php if (!empty($notifications)) : ?&gt;
                &lt;?=$notifications?&gt;
                &lt;?php endif; ?&gt;
                &lt;?php if (!empty($pagination)): ?&gt;
                &lt;div id=&quot;pagination&quot;&gt;&lt;?=$pagination?&gt;&lt;/div&gt;
                &lt;?php endif; ?&gt;
            &lt;/div&gt;
        &lt;?php endif; ?&gt;

        &lt;?php 
        $main_content_class = '';
        if ($no_actions AND $no_notification) : $main_content_class = 'noactions_nonotification';
        elseif ($no_actions AND $no_titlebar) : $main_content_class = 'noactions_notitlebar';
        elseif ($no_titlebar) : $main_content_class = 'notitlebar';
        elseif ($no_actions) : $main_content_class = 'noactions';
        endif;
        ?&gt;

        &lt;div id=&quot;fuel_main_content&lt;?=($no_menu) ? '_compact' : ''?&gt;&quot;&lt;?=(!empty($main_content_class)) ? ' class=&quot;'.$main_content_class.'&quot;' : ''?&gt;&gt;
            &lt;!-- BODY --&gt;
            &lt;?php $this-&gt;load-&gt;module_view(REPORTS_FOLDER, 'preactas_content');  ?&gt;

            &lt;?=$this-&gt;form-&gt;hidden('fuel_inline', (int)$this-&gt;fuel-&gt;admin-&gt;is_inline())?&gt;
        &lt;/div&gt;
        &lt;?=$this-&gt;form-&gt;close()?&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;fuel_modal&quot; class=&quot;jqmWindow&quot;&gt;&lt;/div&gt;

&lt;div id=&quot;fuel_main_content_inner&quot;&gt;
    &lt;div id=&quot;fuel_main_content_line&quot; style='margin-bottom: 20px;'&gt;
        &lt;h3&gt;Report1:&lt;/h3&gt;
    &lt;/div&gt;

    &lt;div id=&quot;fuel_main_content_line&quot;&gt;
        &lt;form enctype=&quot;multipart/form-data&quot;&gt;
            My form
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><br />
`</p>

<p>And this is the text I get instead of the left menu entries:<br />
`A PHP Error was encountered<br />
Severity: Warning</p>

<p>Message: Undefined variable $nav_selected</p>

<p>Filename: _blocks/nav.php</p>

<p>Line Number: 59</p>

<p>Backtrace:</p>

<p>File: /var/www/html/autoPIR/fuel/modules/fuel/views/_blocks/nav.php<br />
Line: 59<br />
Function: _error_handler`</p>

<p>I know a nav_selected option can be added to MY_fuel_modules.php so added following line to it, but produces other errors, as there is no model or tables related:<br />
<code>$config['modules']['reports'] = array();</code></p>

<p>Is it possible to get this kind of view working?<br />
An example would be very useful.</p>

<p>Thanks for your help!</p>
</div>]]>
        </description>
    </item>
    <item>
        <title>Advanced Module custom_fields</title>
        <link>https://forum.getfuelcms.com/discussion/3656/advanced-module-custom-fields</link>
        <pubDate>Wed, 03 May 2023 15:41:22 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>almostcompletely</dc:creator>
        <guid isPermaLink="false">3656@/discussions</guid>
        <description><![CDATA[<p>I'd like to encapsulate all the coding for a custom field inside my advanced module.</p>

<p>I've mostly succeeded but can only get it to work with a local configuration in ./application/config/custom_fields.php</p>

<p>Is it possible to move the custom_fields.php to ./modules/my_module/config?<br />
What's the naming convention (my_module_custom_fields.php)?<br />
Is this configuration loaded automatically for all other modules that might want to use the new field type?</p>

<p>Thanks</p>
]]>
        </description>
    </item>
    <item>
        <title>where to start</title>
        <link>https://forum.getfuelcms.com/discussion/3649/where-to-start</link>
        <pubDate>Tue, 10 Jan 2023 20:45:50 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>lindaweb</dc:creator>
        <guid isPermaLink="false">3649@/discussions</guid>
        <description><![CDATA[<p>Hello,<br />
I'm new in fuel cms, I like it, installed and configured, I can't find basic steps to get me started.<br />
I tried online documentation , but I'm not getting farther. <br />
how to use Bootstrap horizontal navigation like <a href="https://migrationbrewing.com/" rel="nofollow">https://migrationbrewing.com/</a><br />
how can I call my articles on the page if I have more than one. <br />
Thank you</p>
]]>
        </description>
    </item>
    <item>
        <title>Advanced Module with an iframe</title>
        <link>https://forum.getfuelcms.com/discussion/3638/advanced-module-with-an-iframe</link>
        <pubDate>Mon, 27 Jun 2022 16:39:12 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>almostcompletely</dc:creator>
        <guid isPermaLink="false">3638@/discussions</guid>
        <description><![CDATA[<p>My advanced module is basically a wrapper for a standalone php application.<br />
The ./views/_admin/main.php default view file contains an iframe which points to ./modules/mymod/third_party/launcher.php<br />
When run through Fuel, the iframe returns a "403 Forbidden: You don't have permission to access this resource." error. I guess that's a Fuel security thing?<br />
Is there any way to get iframes within a module to work?</p>
]]>
        </description>
    </item>
    <item>
        <title>list_items "custom" filter</title>
        <link>https://forum.getfuelcms.com/discussion/3636/list-items-custom-filter</link>
        <pubDate>Tue, 12 Apr 2022 08:36:18 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>rouge75</dc:creator>
        <guid isPermaLink="false">3636@/discussions</guid>
        <description><![CDATA[<p>Hello,</p>

<p>Still here, loving Fuel CMS ! <img src="https://forum.getfuelcms.com/resources/emoji/smile.png" title=":)" alt=":)" height="20" /><br />
I am trying to make a small change in filters, but can not get things to work the way I would like to.</p>

<p>I have a brand and country filter, and i would like for the select to be: where (country in ("",$this-&gt;filters['country']) and brand in ("",$this-&gt;filters['brand']))<br />
so that I get all the entries where country is either the one I selected or empty and brand is either the one i selected or empty.</p>

<p>I am able to make the correct where statement, but by default, the parent list_items will add : <br />
AND (LOWER(country) LIKE "%country%" OR LOWER(brand) LIKE "%brand%")</p>

<p>How can i prevent the parent from adding another where clause ?</p>

<p>Cheers,<br />
Xavier.</p>
]]>
        </description>
    </item>
    <item>
        <title>enable module view instead of default view</title>
        <link>https://forum.getfuelcms.com/discussion/3620/enable-module-view-instead-of-default-view</link>
        <pubDate>Wed, 08 Sep 2021 10:51:10 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>Jers</dc:creator>
        <guid isPermaLink="false">3620@/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I've implemented the sample files from the simple module tutorial. In the CMS everything is working but on the front-end /articles/{slug} ends up on my default view instead of view/articles.php.</p>

<p>I have also added $pages['articles/:any'] = array('view' =&gt; 'articles'); to _variables/global.php</p>

<p>If I add an exit(); at the end of the view/articles.php, the page is displayed correctly.</p>

<p>What is redirecting my view to my default view? And how can I prevent this?</p>

<p>Thanks in advance.</p>
]]>
        </description>
    </item>
    <item>
        <title>Using fuel admin to add/edit entries to an external database only accessible with json APIs</title>
        <link>https://forum.getfuelcms.com/discussion/3619/using-fuel-admin-to-add-edit-entries-to-an-external-database-only-accessible-with-json-apis</link>
        <pubDate>Tue, 10 Aug 2021 15:08:23 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>rouge75</dc:creator>
        <guid isPermaLink="false">3619@/discussions</guid>
        <description><![CDATA[<p>I use fuelcms to admin several mysql databases and I love it !<br />
I would like to admin an external database which I can only access through a REST/json api (it's a SAP database).</p>

<p>I am ready to customize a model so that the parsing of the json is made in the model to feed the structures needed in fuel to admin the database (with the "classical" list view + edit form)<br />
If that is possible, what would be the easiest way to proceed ?</p>

<p>Cheers,<br />
Xavier</p>
]]>
        </description>
    </item>
    <item>
        <title>How to fill in fields when an option is selected in a dropdown list ?</title>
        <link>https://forum.getfuelcms.com/discussion/3541/how-to-fill-in-fields-when-an-option-is-selected-in-a-dropdown-list</link>
        <pubDate>Sun, 07 Mar 2021 18:00:59 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>rouge75</dc:creator>
        <guid isPermaLink="false">3541@/discussions</guid>
        <description><![CDATA[<p>Hello !<br />
Is there an easy way (Fuel CMS often has some <img src="https://forum.getfuelcms.com/resources/emoji/smile.png" title=":)" alt=":)" height="20" />) to fill in other fields with values when :</p>

<ul>
<li>an option is selected in a dropdown list</li>
<li>a field is changed (like a date field)</li>
</ul>

<p>Something like javascript "onblur"</p>
]]>
        </description>
    </item>
    <item>
        <title>One to many : controller &amp; model example</title>
        <link>https://forum.getfuelcms.com/discussion/3536/one-to-many-controller-model-example</link>
        <pubDate>Tue, 02 Mar 2021 07:32:04 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>rouge75</dc:creator>
        <guid isPermaLink="false">3536@/discussions</guid>
        <description><![CDATA[<p>Hello,</p>

<p>I have been using Fuel for a while now, and I just love it !<br />
I think it's a perfect balance for many things.</p>

<p>I am now trying to go to the next level <img src="https://forum.getfuelcms.com/resources/emoji/smile.png" title=":)" alt=":)" height="20" /></p>

<p>I would like to edit invoice details in the CMS, so for example,<br />
Invoice table :<br />
<code>invoice_id, customer_name, address, city, etc ...</code><br />
Items table :<br />
<code>item_id, invoice_id, description, quantity, price</code><br />
(one to many)</p>

<p>In the form_fields of my Invoice_model, I added a template field :</p>

<pre><code>$fields['invoice_items'] = [
    'view'=&gt; '_admin/items',
    'type' =&gt; 'template',
    'repeatable' =&gt; true,
    'fields' =&gt; [
        'description' =&gt; [
            'style' =&gt; 'width: 400px; text-align:left'
        ],
        'quantity' =&gt; [
            'style' =&gt; 'width: 40px; text-align:center'
        ],
        'price' =&gt; [
            'style' =&gt; 'width: 60px; text-align:right'
        ]
    ]
];
</code></pre>

<p>and it displays correctly in the create/edit view.</p>

<p>I have several questions :</p>

<ul>
<li>how do I populate this "template" field (and sub fields) with the items from the Items table ? Is a Module the right class for my Invoice_controller ?</li>
<li>is it the right thing to do, to save the invoice items in the "on_after_save" of my Invoice_model ?</li>
<li>is there a simpler way to populate and save the items that I am missing ? (something similar to the has_many mechanism that would do this automagically) ?</li>
</ul>

<p>Cheers !<br />
Xavier</p>
]]>
        </description>
    </item>
    <item>
        <title>Users extending with account expiration</title>
        <link>https://forum.getfuelcms.com/discussion/3528/users-extending-with-account-expiration</link>
        <pubDate>Sat, 30 Jan 2021 11:44:53 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>markomostar</dc:creator>
        <guid isPermaLink="false">3528@/discussions</guid>
        <description><![CDATA[<p>Hi all,</p>

<p>I've extended fuel_users table with extra "date_expire" date field which I use to check if account is about to expire. <br />
Than I can run cronjob and set expired accounts to "inactive", by setting "active" to NO inside fuel_users table.</p>

<p>What I would love to do is change login way and display different error message. I would love to check the "date_expire" together with "active" column. If account is expired I would love to return message that its deactivated due expiration date.</p>

<p>I can extend _blocks/notifications.php to show different message if(date_expire &lt; now()) kind of way.</p>

<p>There is probably something safer and better to do instead.</p>

<p>Possible way is to keep user "active" in database but force log-out after login and date_expire is checked. If expired, redirect user to different page and show account expiration message.</p>

<p>I would prefer option one, but don't know how to make it.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to limit selection on Multi select form Field</title>
        <link>https://forum.getfuelcms.com/discussion/3151/how-to-limit-selection-on-multi-select-form-field</link>
        <pubDate>Mon, 27 May 2019 11:28:52 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>Justyce</dc:creator>
        <guid isPermaLink="false">3151@/discussions</guid>
        <description><![CDATA[<p>I am trying to limit the total number of items that can be selected on the $has_many multiselect form field, the user guide don't  seem to provide a way to this. is there  parameter for such feature like LIMIT on multi select form field.<br />
$fields['multi_example'] = array('type' =&gt; 'multi', 'options' =&gt; $options, 'value' =&gt; 'a' , 'limit'=&gt; some value);</p>
]]>
        </description>
    </item>
    <item>
        <title>Creating a frontend search module</title>
        <link>https://forum.getfuelcms.com/discussion/3441/creating-a-frontend-search-module</link>
        <pubDate>Fri, 17 Jan 2020 04:29:56 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>sammy</dc:creator>
        <guid isPermaLink="false">3441@/discussions</guid>
        <description><![CDATA[<p>I recently adopted to use fuelCMS for our university website, was able to integrate with MDB(Material design), but I want to build a search module that can search the Website content from the frontEnd just like you have in other CMS, I have followed the Search module instructions but i got an empty string =&gt; ( 0 Results for “” No search results found). I really need to get this to work so as to convince them that the flexibility and control you have with fuelCMS can not be gotten form others that boxed you in corner. Please advice.</p>
]]>
        </description>
    </item>
    <item>
        <title>Making twitter feeds to display in fuelCMS</title>
        <link>https://forum.getfuelcms.com/discussion/3504/making-twitter-feeds-to-display-in-fuelcms</link>
        <pubDate>Wed, 25 Nov 2020 03:39:31 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>sammy</dc:creator>
        <guid isPermaLink="false">3504@/discussions</guid>
        <description><![CDATA[<p>Just yesterday, our information unit requested that they want our twitter handle feeds to automatically be displayed on the website, so whenever there is an update in the twitter handle it get displayed on the website. <br />
This I have never done, please can anyone give me a pointer on how to go about this task?.</p>

<p>Thank you</p>
]]>
        </description>
    </item>
    <item>
        <title>How to make Primary Key (ID) editable in Fuel Forms.</title>
        <link>https://forum.getfuelcms.com/discussion/3497/how-to-make-primary-key-id-editable-in-fuel-forms</link>
        <pubDate>Thu, 12 Nov 2020 14:16:03 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>binod</dc:creator>
        <guid isPermaLink="false">3497@/discussions</guid>
        <description><![CDATA[<p>In fuel form I need make PrimaryKey ID editable for create (and edit) form.<br />
How could this be achieved; is there any Model parameter to be set?<br />
I tried putting public $hidden_fields = []; but not working.<br />
Alternately putting $fields['id']['type']          = 'text'; inside form_fields() model function also didn't work.</p>
]]>
        </description>
    </item>
    <item>
        <title>Extend and expose user custom field</title>
        <link>https://forum.getfuelcms.com/discussion/3487/extend-and-expose-user-custom-field</link>
        <pubDate>Fri, 09 Oct 2020 19:27:42 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>markomostar</dc:creator>
        <guid isPermaLink="false">3487@/discussions</guid>
        <description><![CDATA[<p>Hi all, I have extend existing Users module and add one extra field to it, for example City. I have 5 users with different City entered and would like to limit all Simple Modules data by that criteria (City). <br />
Simple Module will pull data from table and column City should be way to limit access for users to see only data they are assigned to.<br />
How can I bind and filter data on that way?</p>

<p>Thanks</p>
]]>
        </description>
    </item>
    <item>
        <title>Ajax for a Select2 with a long list of elements</title>
        <link>https://forum.getfuelcms.com/discussion/3464/ajax-for-a-select2-with-a-long-list-of-elements</link>
        <pubDate>Tue, 26 May 2020 10:24:13 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>weblar</dc:creator>
        <guid isPermaLink="false">3464@/discussions</guid>
        <description><![CDATA[<p>Hi!<br />
I have a select2 field with loads a huge list of data (13000+ items). This makes the page load very slow and it's very annoying.<br />
I've already set the "minimumInputLength" setting to 3 but the page load is still loading all the data at the beginning.<br />
Is there anyway to set an Ajax source for the select2 field? Or pagination? Or any other idea to speed up the page loading?</p>

<p>Thank you!<br />
Jaime</p>
]]>
        </description>
    </item>
    <item>
        <title>Inserting data with has_many</title>
        <link>https://forum.getfuelcms.com/discussion/3472/inserting-data-with-has-many</link>
        <pubDate>Tue, 23 Jun 2020 20:25:37 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>zwelldesigns</dc:creator>
        <guid isPermaLink="false">3472@/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I'm wondering where I can look to find information about using queries to insert data for a simple module and then populating the <code>fuel_relationships</code> table based on this data. In my simple module, the user can upload data for the Dictionary in bulk. If entries exist, the existing entry is updated. If entries don't exist, they're inserted. I handle this in my Dictionary model. The theme for each entry is <code>has_many</code>.  The code in the model is below (note that this code is not functional because I've been messing around with it -- it was functional when I did not do the <code>on_after_save</code> hook to try and insert data into the <code>fuel_relationships</code> table):</p>

<pre><code>public function d_upload($data = array()){ 
        $inserts = 0; 
        $updates = 0; 

        foreach($data as $k=&gt;$d){ 
            $this-&gt;db-&gt;where('slug', $d['slug']);
            $query = $this-&gt;db-&gt;get('slp_dictionary');
            if ($query-&gt;num_rows() &gt; 0){
                if(!empty($d['examples'])){ 
                    $d['examples'] = json_encode($d['examples']); 
                }

                $d = $this-&gt;on_before_save($d);
                $this-&gt;db-&gt;where('slug', $d['slug']);
                $this-&gt;db-&gt;set($d); 
                $this-&gt;db-&gt;update('slp_dictionary');
                $this-&gt;on_after_save(array('update', 'candidate_id'=&gt;$query-&gt;result_array(), 'foreign_id'=&gt;$d['theme']));
                $updates = $updates+1; 
            }
            else{
                if(!empty($d['examples'])){ 
                    $d['examples'] = json_encode($d['examples']); 
                }
                $d = $this-&gt;on_before_save($d);
                $this-&gt;db-&gt;set($d); 
                $this-&gt;db-&gt;insert('slp_dictionary'); 
                $inserts = $inserts+1; 
            }
        } 
        return $inserts.' new entries created and '.$updates.' existing entries updated successfully.';

public function on_before_save($values)
    {
        // this inserts the user ID of the person who edited this last 
        $CI=get_instance(); 
        $this-&gt;_editable_by_user();
        $values['last_modified_by'] = (!empty($this-&gt;limit_to_user_field) AND !empty($values['last_modified_by'])) ? $values['last_modified_by'] : $CI-&gt;fuel-&gt;auth-&gt;user_data('id');
        $values['publish_date'] = datetime_now();
        //$values['theme'] = implode($values['theme'], ','); 
        return $values;
    }
    public function on_after_save($values)
    {
        switch($values[0]){ 
            case &quot;update&quot;: 
                $this-&gt;db-&gt;where(array('candidate_table'=&gt;'slp_dictionary', 'candidate_key'=&gt;$values['candidate_id'][0]['id']));
                $updateQ = $this-&gt;db-&gt;get('fuel_relationships'); 
                if(is_array($values['foreign_id'])){ 
                    if($updateQ-&gt;num_rows() &lt; count($values['foreign_id'])){ 
                        echo 'less'; 
                    }
                    else{ 
                        echo 'more';
                    } 
                    foreach($values['foreign_id'] as $id){
                        $this-&gt;db-&gt;where(array('candidate_table'=&gt;'slp_dictionary', 'candidate_key'=&gt;$values['candidate_id'][0]['id']));
                        $this-&gt;db-&gt;set(array('foreign_key'=&gt;$id));
                    }
                }
                else{ 
                    $this-&gt;db-&gt;set(array('foreign_key'=&gt;$values['foreign_id']));
                } 
                //$this-&gt;db-&gt;update('fuel_relationships'); 
            break; 
            default: 

            break; 
        }   
    }   
</code></pre>

<p>I couldn't find any info on using has_many with insert() and update() and I couldn't find any samples in source code, so I was winging it so that the on_after_save hook would manipulate the fuel_relationships table. I got it to work in simple cases where a single existing entry has a single foreign key, but now I'm lost in the rabbit hole when an existing entry has one existing key, but not another and I need to update one and create another. (Logically, I know how to do it, but it seems like overkill and a time suck.)</p>

<p>So I'm wondering if there's a quick and easy way of inserting has_many foreign keys/updating existing ones?</p>

<p>Thanks!</p>
]]>
        </description>
    </item>
    <item>
        <title>Search Module won't index special characters</title>
        <link>https://forum.getfuelcms.com/discussion/3476/search-module-wont-index-special-characters</link>
        <pubDate>Mon, 20 Jul 2020 18:53:29 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>zwelldesigns</dc:creator>
        <guid isPermaLink="false">3476@/discussions</guid>
        <description><![CDATA[<p>Hi!</p>

<p>I have special characters with diacritics and in alternate writing systems (Devanagari) in my pages. I've installed the Search Module and when it crawls my pages, it does not index any special characters. For instance, on a page that has this content: <br />
<code>कईं पाँब · kaĩĩ pããba</code></p>

<p>It will index it with all special characters removed: <br />
<code>ka pba</code></p>

<p>It seems that this probably originates from the <code>scrape_page</code> or <code>index_page</code> functions in the Search module's <code>Fuel_search</code> library, but I cannot really tell where it comes from internal to those functions. Is there a way to fix this?</p>

<p>Thanks!</p>
]]>
        </description>
    </item>
    <item>
        <title>Editing Page Variables</title>
        <link>https://forum.getfuelcms.com/discussion/3465/editing-page-variables</link>
        <pubDate>Sun, 31 May 2020 18:28:38 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>EcotypeS</dc:creator>
        <guid isPermaLink="false">3465@/discussions</guid>
        <description><![CDATA[<p>I have a large number of pages where I serve up the content from a database, and I use the model for data entry typically with many entries (think news items) per page.  There are a few things that should logically be page variables with the user having some way to edit them.  I don't see this in the documentation, and it looks like if the pages are editable as using Fuel's pages, I lose the ability to use my custom code.</p>

<p>Is there any way to give the user access to editing the handful of things that are logically page variables?  For instance, page title?  Right now I am setting the variables in the view file, and the user has no access for editing them.</p>

<p>Thanks.</p>
]]>
        </description>
    </item>
    <item>
        <title>Simple Module List Actions 404</title>
        <link>https://forum.getfuelcms.com/discussion/3463/simple-module-list-actions-404</link>
        <pubDate>Sun, 24 May 2020 03:21:17 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>zwelldesigns</dc:creator>
        <guid isPermaLink="false">3463@/discussions</guid>
        <description><![CDATA[<p>Hi!</p>

<p>I am working on a simple module for a dictionary, and in addition to the "Create" button that comes with the simple module, I want to add an 'list_actions' button to bring the user to a custom page where they can upload a file that will be parsed and inserted into the dictionary database. So far I have set up the module like this in MY_fuel_modules.php:</p>

<pre><code>$config['modules']['dictionary'] = array(
    'module_name' =&gt; 'SLP Dictionary', 
    'permissions' =&gt; 'dictionary', 
    'js'=&gt;'DictionaryController.js', 
    'display_field' =&gt; 'headword', 
    'table_headers' =&gt; array( 
        'id' =&gt; 'Entry #', 
        'headword' =&gt; 'Headword', 
        'gloss_en' =&gt; 'English', 
        'gloss_nep' =&gt; 'Nepali', 
        'theme' =&gt; 'Theme'
    ), 
    'icon_class' =&gt; 'ico_logs', 
    'archivable' =&gt; TRUE, 
    'list_actions' =&gt; array(
        'dictionary/upload' =&gt; 'Bulk Upload SFM'  
    ), 
    'pages' =&gt; array( 
        'base_uri' =&gt; 'dictionary', 
        'list' =&gt; 'dictionary/all', 
        'post' =&gt; 'dictionary/entry', 
    ), 
); 
</code></pre>

<p>A button is generated at the top which says "Bulk Upload SFM." However, when I click it, it takes me to <a href="http://.../fuel/dictionary/upload" rel="nofollow">http://.../fuel/dictionary/upload</a> and this page generates a 404. How can I add a route to this page and select the admin view for it?</p>

<p>Should I make the bulk uploader a separate simple module?</p>

<p>Thanks!!</p>
]]>
        </description>
    </item>
    <item>
        <title>Module frontend page shows 404</title>
        <link>https://forum.getfuelcms.com/discussion/3460/module-frontend-page-shows-404</link>
        <pubDate>Wed, 06 May 2020 20:10:23 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>prayas</dc:creator>
        <guid isPermaLink="false">3460@/discussions</guid>
        <description><![CDATA[<p>Hello,</p>

<p>I am creating a module called article following the article in <a href="https://docs.getfuelcms.com/modules/tutorial" rel="nofollow">https://docs.getfuelcms.com/modules/tutorial</a></p>

<p>At the end, i created the file articles.php within /application/views/ directory, but the site returns 404 not found.</p>

<p>Can you please help me with it?</p>

<p>Here are my some code:<br />
MY_fuel_modules.php<br />
$config['modules']['articles'] = array(<br />
  'preview_path'   =&gt;  'articles/{slug}',<br />
  'display_field'  =&gt; 'title',<br />
  'sanitize_input' =&gt; array('template','php'),<br />
);</p>

<p>Articles_model.php<br />
class Articles_model extends Base_module_model {<br />
    function __construct()<br />
    {<br />
        parent::__construct('articles');<br />
    }<br />
    function form_fields($values = array(), $related = array())<br />
    {<br />
        $fields = parent::form_fields($values, $related);<br />
        $fields['content']['img_folder'] = 'articles/';<br />
        $fields['image']['folder'] = 'images/articles/';<br />
        return $fields;<br />
    }<br />
}</p>

<p>class Article_model extends Base_module_record {<br />
    public function get_url()<br />
    {<br />
        return site_url('articles/'.$this-&gt;slug);<br />
    }<br />
    public function get_image_path()<br />
    {<br />
        return img_path('articles/'.$this-&gt;image);<br />
    }<br />
}</p>

<p>THanks</p>
]]>
        </description>
    </item>
    <item>
        <title>How to create post gallery?</title>
        <link>https://forum.getfuelcms.com/discussion/3452/how-to-create-post-gallery</link>
        <pubDate>Tue, 03 Mar 2020 17:29:25 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>pappagallosm</dc:creator>
        <guid isPermaLink="false">3452@/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I've successfully installed this module: <a href="https://github.com/daylightstudio/FUEL-CMS-Blog-Module" rel="nofollow">https://github.com/daylightstudio/FUEL-CMS-Blog-Module</a> I would like to ask how can I add a post gallery for upload a list of images, thanks.</p>
]]>
        </description>
    </item>
    <item>
        <title>Can't override options_list</title>
        <link>https://forum.getfuelcms.com/discussion/3444/cant-override-options-list</link>
        <pubDate>Sun, 09 Feb 2020 23:01:40 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>soonerdm</dc:creator>
        <guid isPermaLink="false">3444@/discussions</guid>
        <description><![CDATA[<blockquote><div>
  <p>public function options_list($key = 'id', $val = '' , $where = array(), $order = TRUE, $group = TRUE)<br />
  {<br />
      $order = 'packages.price asc';<br />
      $data = parent::options_list($key, $val, $where, $order);<br />
    //echo("HERE HERE" ); <br />
  <br />
      return $data;<br />
  }</p>
</div></blockquote>

<p>Does absolutely nothing.</p>

<p>I'm assuming this function is for the list of all entries when you click on the menu item.</p>
]]>
        </description>
    </item>
    <item>
        <title>Advanced Module in a popup</title>
        <link>https://forum.getfuelcms.com/discussion/3450/advanced-module-in-a-popup</link>
        <pubDate>Thu, 20 Feb 2020 18:48:12 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>almostcompletely</dc:creator>
        <guid isPermaLink="false">3450@/discussions</guid>
        <description><![CDATA[<p>Hi</p>

<p>I have a working advanced module I'd like to get to pop up in a window - inline_edit style. I can get it to do this but the whole Fuel interface appears rather than just the module's home page.</p>

<p>Any suggestions on what I can do?</p>

<p>The main module's controller is initialised using:<br />
<code>require_once(FUEL_PATH.'/controllers/Module.php');</code><br />
<code>class test_module extends Module {</code><br />
<code>...</code><br />
<code>}</code></p>
]]>
        </description>
    </item>
    <item>
        <title>Simple module question - Trying to decipher tags and the use of categories when creating tags</title>
        <link>https://forum.getfuelcms.com/discussion/3431/simple-module-question-trying-to-decipher-tags-and-the-use-of-categories-when-creating-tags</link>
        <pubDate>Mon, 30 Dec 2019 02:57:21 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>EcotypeS</dc:creator>
        <guid isPermaLink="false">3431@/discussions</guid>
        <description><![CDATA[<p>Still converting from 0.97 to 1.4 -- have the scenario below set up duplicatively but individually in 0.97 but considering moving to the built-in Fuel tags.  In 0.97, I have model for projects, model for project tags, model for projects to tags links (and similarly for the awards)</p>

<p>My tags are the names of 5 committees</p>

<p>I have a table of projects -- each project needs to be tagged with one or more of the committees -- think table with model &amp; views -- each committee has a page, and all projects associated with that committee will be listed on the committee's page, some projects will be on the page for more than one committee</p>

<p>I have a table of awards -- each award needs to be tagged with one or more of the committees -- think table with model &amp; views-- each committee has a page, and all awards associated with that committee will be listed on the committee's page, some projects will be on the page for more than one committee</p>

<p>So, I'm assuming the committee names are the tags</p>

<p>I'm looking at the built in tags creation form -- it wants a category</p>

<p>Given that the committees are always the same, whether for projects or awards, do I need one generic category for the form?  Or do I need a category for projects and a category for awards -- each with the same set of committee tags?</p>

<p>If the tags only need to be entered once, I think this would reduce the potential for user error.  But if I have to duplicate the tags once for the projects and again for the awards, I'm seeing little reward for the effort of conversion.</p>

<p>Can you tell me if I can use a single set of tags for both projects and awards?</p>

<p>Thanks</p>
]]>
        </description>
    </item>
    <item>
        <title>Noob here - Why doesn't fuel_model show anything from my simple module database?</title>
        <link>https://forum.getfuelcms.com/discussion/3377/noob-here-why-doesnt-fuel-model-show-anything-from-my-simple-module-database</link>
        <pubDate>Sat, 30 Nov 2019 21:06:38 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>Avicus</dc:creator>
        <guid isPermaLink="false">3377@/discussions</guid>
        <description><![CDATA[<p>I've made a simple module names 'stories' using this syntax on the command line:<br />
<code>php index.php fuel/generate/simple stories</code></p>

<p>I've made an entry in the CMS in the stories module and wanted to display the title of each story added.</p>

<p>Here is my code within a static view file, which shows fuel_model giving an empty array, and an alternative method of retrieving my db information:</p>

<p><code>&lt;?php

$stories = fuel_model('stories');  //this shows an empty array
foreach ($stories as $value){
    echo $value['title'].&quot;&lt;br /&gt;&quot;.$value['content'].&quot;&lt;br /&gt;&lt;br /&gt;&quot;;
}

$stories2 = $this-&gt;stories_model-&gt;list_items(); //this works
foreach ($stories2 as $value){
    echo $value['title'].&quot;&lt;br /&gt;&quot;.$value['content'].&quot;&lt;br /&gt;&lt;br /&gt;&quot;;
}

echo &quot;&lt;br /&gt;&quot;;
echo &quot;&lt;br /&gt;&quot;;
var_dump($stories); //this shows an empty array
echo &quot;&lt;br /&gt;&quot;;
var_dump($stories2); //this works

?&gt;</code></p>

<p>I thought I should be using fuel_model() to get stuff from the module... <br />
Please help!</p>
]]>
        </description>
    </item>
    <item>
        <title>Students Registration</title>
        <link>https://forum.getfuelcms.com/discussion/3197/students-registration</link>
        <pubDate>Wed, 02 Oct 2019 09:56:13 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>harshalone</dc:creator>
        <guid isPermaLink="false">3197@/discussions</guid>
        <description><![CDATA[<p>Hi I am trying to build a module in which people will register on my portal as students or instructors. Then they will be able to purchase a test, complete it and get there certification.</p>

<p>I can understand that I have to create separate dashboard layout for each user type. But I was just wondering should I create a separate database table for this 3rd party user. Because they will not be using fuel CMS dashboard. I will create a saperate dashboard for them.</p>

<p>Another question is how fuel handles sessions for those users because I want to make sure it will work exactly as any user dashboard.</p>
]]>
        </description>
    </item>
    <item>
        <title>User Registration and Additional User Information</title>
        <link>https://forum.getfuelcms.com/discussion/2539/user-registration-and-additional-user-information</link>
        <pubDate>Tue, 07 Jun 2016 06:11:04 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>dmitriyk</dc:creator>
        <guid isPermaLink="false">2539@/discussions</guid>
        <description><![CDATA[The documentation doesn't have any information on registering a user programatically or adding new fields.<br /><br />I can create a new module with a table relation to the users for new user info. But how do I create a new user?<br /><br />Is there no function like $this-&gt;fuel-&gt;users-&gt;create($array)?]]>
        </description>
    </item>
    <item>
        <title>20 Essential CSS Tricks Every Designer Should Know</title>
        <link>https://forum.getfuelcms.com/discussion/3182/20-essential-css-tricks-every-designer-should-know</link>
        <pubDate>Fri, 13 Sep 2019 01:31:00 +0000</pubDate>
        <category>Modules</category>
        <dc:creator>RichPickar</dc:creator>
        <guid isPermaLink="false">3182@/discussions</guid>
        <description><![CDATA[<p>After incomes a level in web development and design, some individuals ask themselves questions together with "the right way to become a web developer or designer"? At a minimal we have been focused on interventions that sought to: increase native organisational capability, with or without some degree of higher-degree federation of local organisations; and foster empowerment by asset formation. Given the range of meanings of the term, the research targeted on tasks that had comparatively modest empowerment objectives. 6. Although it does not deal with the issue of organisational culture directly, an exception is a current paper by Rossi (2004 Rossi, D. 2004. Revisiting Foucauldian approaches: power dynamics in improvement projects. Larger projects should use tools akin to JIRA. In the column of essential jot down the requirement with out which the investor is unlikely to make use of the CRM system and in the opposite column, i.e. in the specified one write those circumstances which can be thought-about. Market demand and the rising needs of timber of the overpopulated country of Bangladesh are other causes contributing to the depletion of forest resources and encouraging unlawful loggers to cut down the timber from forests area.</p>

<p>my web blog; <a rel="nofollow" href="https://tinyurl.com/designcoder">freelancer bd</a></p>
]]>
        </description>
    </item>
   <language>en</language>
   </channel>
</rss>
