All Discussions - FUEL CMS Forum http://www.getfuelcms.com/forums/discussions/feed.rss Fri, 18 May 12 04:18:03 -0400 All Discussions - FUEL CMS Forum en-CA How to add a link on a column. http://www.getfuelcms.com/forums/discussion/777/how-to-add-a-link-on-a-column. Wed, 09 May 2012 16:41:49 -0400 lckamal 777@/forums/discussions $this->data_table->add_action('file', 'assets/pdf/order/{file}', 'url');

but i get url with no file name like this:
http://localhost/ch/invoice/admin/assets/pdf/order/_______ filename mising here

what is the problem?

Or I should try other way to get the file downloaded from the datatable.]]>
HELP! I got the white screen of death after merging in the latest master revision! http://www.getfuelcms.com/forums/discussion/764/help-i-got-the-white-screen-of-death-after-merging-in-the-latest-master-revision Thu, 03 May 2012 17:57:39 -0400 eriklharper 764@/forums/discussions
Thanks,
Erik]]>
Related model and FK error http://www.getfuelcms.com/forums/discussion/788/related-model-and-fk-error Wed, 16 May 2012 11:09:48 -0400 DaxCax 788@/forums/discussions
I'm getting an error when I try to relate two models (tour_events_model and courses_model). This is the error:

A Database Error Occurred

Error Number: 1054

Unknown column 'tm_Course.tour_event_id' in 'where clause'

SELECT tm_Course.*, courseName, city, TourEvent_id, eventName, Division_id, divisionName, RoundType_id, roundType, tm_Course.published FROM (tm_Course) LEFT JOIN tm_TourEvent ON tm_Course.TourEvent_id = tm_TourEvent.id LEFT JOIN tm_Division ON tm_Course.Division_id = tm_Division.id LEFT JOIN tm_RoundType ON tm_Course.RoundType_id = tm_RoundType.id WHERE `tm_Course`.`tour_event_id` = '9'

Filename: core/MY_Model.php

Line Number: 261



Problem is that there is no table.column like tm_Course.tour_event_id, instead I have tm_Course.TourEvent_id. Where do I change this, if I not want (other applications uses this db) to change column names in the database?


This is the code that triggers it:


// ******************* NEW RELATED CATEGORY FIELD BEGIN *******************
$related = array('tour_events' => 'courses_model');
// ******************* NEW RELATED CATEGORY FIELD END *******************

$fields = parent::form_fields($values, $related);



Thanks for any input!

]]>
CKEditor & preview http://www.getfuelcms.com/forums/discussion/789/ckeditor-preview Thu, 17 May 2012 04:15:27 -0400 Gumster 789@/forums/discussions
I've been using CKEditor as my WYSIWYG of choice but have noticed only recently the "preview" button is very different to the Markitup equivalent. I've just skimmed through the CKEditor developers guide and could find no mention of editing the preview functionality to make it similar to the Markitup one (ie insert WYSIWYG content into the fuel preview template).

I don't imagine this discrepancy in functionality is an accident - but I thought I'd ask anyway!

I've seen a solution in the making though with this thread: http://stackoverflow.com/questions/4401693/ckeditor-preview-method]]>
Image upload in pages http://www.getfuelcms.com/forums/discussion/780/image-upload-in-pages Thu, 10 May 2012 10:05:19 -0400 driechel 780@/forums/discussions http://www.getfuelcms.com/forums/discussion/comment/2799/#Comment_2799

I have the same issues. How do other people do it when they want the customer to be able to upload images when they create pages in the admin.

Another question that I have. Is it possible to have the same option of choosing a picture like in you can do in a model when you use fields that end with image?]]>
Auto fill a form on click of a button http://www.getfuelcms.com/forums/discussion/785/auto-fill-a-form-on-click-of-a-button Tue, 15 May 2012 01:35:11 -0400 Fabiosliva 785@/forums/discussions Internet Explorer & Session login http://www.getfuelcms.com/forums/discussion/787/internet-explorer-session-login Wed, 16 May 2012 09:14:54 -0400 Gumster 787@/forums/discussions
I've tried the hybrid library from http://www.matthewfedak.co.uk/session_hybrid_codeigniter.html but this hasn't seemingly helped, and am currently back with the default library, with database enabled & encryption, the cookie name with underscore removed, and 'saved_page_state_max' = 1.

What is the current best practice for this problem, if you've encountered it? And what is the process by which the /fuel cookies are created ?

From the ci_session table I have some entries that look like this:
a:1:{s:37:"fuel_20939f4faf5d01be73f3486c3ae6b248";a:0:{}}
but others with many more fields in the empty braces - is this the data limited by saved_page_state_max?

The issue is especially irksome in that this is the client's 1st impression, not of a great CMS, but something problematic and so far, insoluable (they installed Chrome to access the admin). I've categorised this in "bug reports" but it's more likely IE's fault.]]>
Alert message http://www.getfuelcms.com/forums/discussion/786/alert-message Tue, 15 May 2012 02:45:54 -0400 fiona 786@/forums/discussions for example in the field age if user enters value greater than 100 alert should pop up

function form_fields($values = array())
{
$fields = parent::form_fields();
$CI =& get_instance();
$CI->load->module_model(Example_FOLDER, 'example_to_permissions_model');
$CI->load->module_model(Example_FOLDER, 'example_to_users_model');
$fields['user']['label'] = 'username';
$fields['vAge']['label'] = 'Age';
$fields['height']['label'] = 'Height';

return $fields;
} ]]>
Can't Upload a Publisher File? http://www.getfuelcms.com/forums/discussion/784/can-t-upload-a-publisher-file Fri, 11 May 2012 12:26:28 -0400 brandonkboswell 784@/forums/discussions
'pub'	=>	'application/x-mspublisher'


I've also added the following to MY_fuel.php


$config['editable_asset_filetypes'] = array(
'images' => 'jpg|jpeg|jpe|gif|png|psd|ai|pdf|eps|ps|xls|ppt|tiff|tif|doc|docx|indd|inx|pub',
'pdf' => 'pdf',
'templates' => 'psd|ai|pdf|eps|ps|xls|ppt|jpeg|jpg|jpe|png|tiff|tif|doc|docx|indd|inx|pub',
'media' => 'jpg|jpeg|jpe|png|gif|mov|mp3|aiff|png|psd|ai|pdf|eps|ps|xls|ppt|tiff|tif|doc|docx|indd|inx|pub'
);


I've also added the following to my templates_model.php file

$fields['file_path_upload'] = array('type' => 'file', 'accept' => 'psd,ai,pdf,eps,ps,xls,ppt,jpeg,pub,jpg,jpe,png,tiff,tif,doc,docx,indd,inx', 'upload_path' => assets_server_path('templates'), 'overwrite' => TRUE);


Finally I've set the following in MY_fuel_module.php

$config['modules']['templates'] = array(
'sanitize_images' => FALSE, // to prevent false positives with xss_clean image sanitation
'sanitize_input' => FALSE
);


All the other file types seem to work but for some reason the publisher files return with "The filetype you are attempting to upload is not allowed". Any idea what would cause this one filetype to fail?


]]>
Unable to login http://www.getfuelcms.com/forums/discussion/116/unable-to-login Tue, 01 Feb 2011 14:01:06 -0500 datrim 116@/forums/discussions I built a site using FUEL and everything is working perfectly on my local WAMP server. I then transferred everything to my remote server and the site is up and running; however, I cannot login to the CMS. If I enter the correct login info it just bounces me back to the login page. If I enter incorrect information I get an error message. Any ideas?

Regards,
Chris.]]>
Howto get FuelCMS working with NGINX? http://www.getfuelcms.com/forums/discussion/77/howto-get-fuelcms-working-with-nginx Sun, 26 Dec 2010 16:17:18 -0500 el2ro 77@/forums/discussions
Has someone got this working with Nginx and (php 5.2.x)?

I followed the instructions and got DB setup and those few configs. My problem now is that I can't log in to the admin backend.

If I go to www.domain.com/fuel --> it will redirect to domain.com/fuel/login/4c325a315a57773d which is ok. But if I enter admin / admin I will be redirected back to login page? (If entered something else I will get login error)

I am there stuck and I will not get into admin backend. Any clues what is going wrong?

I have tried with master and 0.91 version and both gives the same result.

When pressing login (when entered user & pass) it will:
post form to /fuel/login/4c325a315a57773d --> which will 302 redirect to /fuel
Which will 302 to /fuel/login/4c325a315a57773d

I will get ci_session cookie and fuel_something where value = 1 when trying to login.

This is needed for Nginx + php-fpm to get codeigniter to work at all.
fuel/application/config/config.php
$config['uri_protocol'] = "REQUEST_URI";

Here are the most important part of my Nginx configs:

#RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]
if (!-f $request_filename) {
rewrite ^/(.*)(fuel/modules/.*) /$2 last;
rewrite ^/(.*)(/assets/.*) /$2 last;
}

location ^~ /fuel/crons {
deny all;
}
location ^~ /fuel/data_backup {
deny all;
}

# Do not allow direct access to the CodeIgniter front controller
location ~* ^/index.php {
rewrite ^/index.php/?(.*)$ /$1 permanent;
}

location / {
try_files $uri @codeigniter;
}

# CodeIgniter Front Controller
location @codeigniter {
internal;
fastcgi_pass php_socket;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/conf/fastcgi_config_ci;
include /etc/nginx/conf/fastcgi_params_ci;
fastcgi_param SCRIPT_NAME index.php;
fastcgi_param SCRIPT_FILENAME /var/www/fuelcmssitefolder/index.php;
}
]]>
how to rename the field in a form http://www.getfuelcms.com/forums/discussion/782/how-to-rename-the-field-in-a-form Fri, 11 May 2012 03:33:13 -0400 vinu 782@/forums/discussions in my table i have value like nusername,ncountry,nstate and in the form also it is displaying the samething how to rename it in a form
thanks]]>
SELECT ASSETS http://www.getfuelcms.com/forums/discussion/783/select-assets Fri, 11 May 2012 11:36:05 -0400 lstables 783@/forums/discussions
$fields['product_first_image'] = array(
'label' => '
Product Photo 1

'.$img1,
'type' => 'file',
'order' => '14',
'upload_path' =>assets_server_path('images/products/'),
'overwrite' => TRUE,
'accept'=>'jpg|jpeg|gif|tiff|png',
);

I would also like the option of the select button, once pressed you can choose a file from the assets folder also.

Thanks]]>
NT Popup on Admin Area http://www.getfuelcms.com/forums/discussion/781/nt-popup-on-admin-area Fri, 11 May 2012 03:14:12 -0400 Joep 781@/forums/discussions
Is it possible to have an NT popup on the fuel admin. Its not that simple by adding the file to /fuel/ because the whole framework lies beyond that folder. Is there a folder that i can protect with NT popup that will be called onlyu by the fuel admin?

Thanks in advance.

Gr Joep]]>
No input file specified http://www.getfuelcms.com/forums/discussion/366/no-input-file-specified Wed, 03 Aug 2011 21:43:47 -0400 bachbouch 366@/forums/discussions Moving it to Production is a little problematic.. The installation seems to work : http://www.tn-policereform.com/yelp3/
but when I try to access to the the dashboard, I get "No input file specified"
Please help.]]>
One model that loads different tables http://www.getfuelcms.com/forums/discussion/774/one-model-that-loads-different-tables Mon, 07 May 2012 13:42:05 -0400 driechel 774@/forums/discussions Quite a difficult explanation but I dont know how to say it differently.
So lets I have a layout that calls a block: columnright.php:


$CI->load->model('banner_rechts_model');
$kolom = $CI->banner_rechts_model->find_all();


Just a part of the code but I do a for each and then a fuel_edit. Pretty straight forward.

Now the problem is that the model 'banner_rechts_model' should load a table based on an if statement. All the table in the database have the same name structure, they begin with the name of the view + _banner_rechts. However I do not know how I can get the name of the from withing the model:


class Banner_rechts_model extends Base_module_model {
function __construct()
{
$CI =& get_instance();

if ((' '.$CI->uri->segment(1)) == ' ')
{
$table_to_load = 'mainpage_banner_rechts';
} else if ($CI->uri->segment(1) == 'fuel' && $CI->uri->segment(3) == 'inline_edit')
{
????? How to get the name of the view file that the block is in?
$table_to_load = view . '_banner_rechts';
}
else
{
$table_to_load = trim($CI->uri->segment(1)) . '_banner_rechts';
}
parent::__construct($table_to_load);


As you can see I tried to do it with the URI. But that doesn't work because the URI only contains the name of the model.

I realize my explanation is quite vaque but I hope someone can point me in the right direction.]]>
Pagination error http://www.getfuelcms.com/forums/discussion/779/pagination-error Thu, 10 May 2012 03:38:36 -0400 Fabiosliva 779@/forums/discussions Chinesse Characters http://www.getfuelcms.com/forums/discussion/778/chinesse-characters Wed, 09 May 2012 19:38:14 -0400 jplozano 778@/forums/discussions The characters are stored as "???"

Thanks in advance!]]>
Some admin pages are stuck loading http://www.getfuelcms.com/forums/discussion/55/some-admin-pages-are-stuck-loading Fri, 17 Dec 2010 15:32:08 -0500 thisisflashpoint 55@/forums/discussions
Thanks,
Mike]]>
Message: Trying to get property of non-object in fuel cms http://www.getfuelcms.com/forums/discussion/765/message%3A-trying-to-get-property-of-non-object-in-fuel-cms Thu, 03 May 2012 22:46:11 -0400 Fabiosliva 765@/forums/discussions
Controller.php

function index()
{
if(!empty($this->data) && isset($this->data)) {
$vars['data']= $this->data;
$vars['gdata']= $this->list_stock();
}
else {
redirect(fuel_url('#'));
}
}
function list_stock() {

$this->load->model('stock_details_model');
$gdata = $this->stock_details_model->list_items();
$gdata['table'] = $this->stock_details_model->list_items();
return $gdata;


}

Views :
<?php <br /> foreach($gdata as $folder) {
?>
stocknumber ?>')"><?=$folder->stocknumber ?>
<?php<br /> }

?>

Model : (stock_details_model)
in list items method there is a query which gets the stock of entire unit

]]>
Crazy problem with input fields not converting quotes! http://www.getfuelcms.com/forums/discussion/762/crazy-problem-with-input-fields-not-converting-quotes Wed, 02 May 2012 06:37:57 -0400 pierlo 762@/forums/discussions take a look here http://imgur.com/a/YMK2F
as you can see the quotes are saved fine (see the title on top of the form), but they're not converted to html entities upon saving.. this only happens in this particular project and I can't seem to understand why... i'm sure i didnt hack anything out of the source!
Is it possible this was a bug solved in a later version? I've tried replacing the Form_builder class with a recent version but no changes at all... please help! thanks!]]>
FuelCMS - backend theme support? http://www.getfuelcms.com/forums/discussion/775/fuelcms-backend-theme-support Tue, 08 May 2012 12:29:54 -0400 pierlo 775@/forums/discussions if none of this is already planned, would it be impossible to create a theme with the current version without hacking anything in the core?

UPDATE
I thought why not give Twitter Bootstrap a try and see how FuelCMS would look with it - so I went along and spent the last hour hacking some of the fuel/modules/fuel/views files and here's the results... kinda shabby actually.

http://imgur.com/a/ihY5z

Don't even ask why I did this, but I guess if you were planning to create a Bootstrap theme and were wondering how it would turn out looking... well, whatever. :)

UPDATE 2
also for those wondering, it's currently impossible to create a custom theme without changing the HTML (unless you really don't need to) ... what I found out is that the html is actually heavily intertwined within PHP functions both inside views (ie fuel/_blocks/fuel_header) or inside libraries (data_table, form) - although the latter are kinda obvious ]]>
Adding a related table to the FUEL module pages_model http://www.getfuelcms.com/forums/discussion/756/adding-a-related-table-to-the-fuel-module-pages_model Sat, 28 Apr 2012 17:02:52 -0400 Gumster 756@/forums/discussions
I'm trying to add a documents field to the pages model, such that for any CMS page, the user might "attach" documents to it. These would then be downloadable on the page view.

I've followed the example in the category->articles tutorial, and while I've had success with that method with "simple" modules, I can't quite get it to work thoroughly for the pages_model.

I've got the combo box up in the CMS admin page, and this allows me to copy "documents" left to right, and save them (ie the lookup table gets the correct document id and page id recorded using the "on_after_save" hook). What doesn't happen is that, on page refresh, the right hand combo box does not record what is already associated.

How does the multiple select underlying the combo boxes read in the "selected" (ie previously attached) data?

Here's what I have in the form_fields method for the pages_model:


function form_fields($values = array())
{
$related = array('documents' => 'documents_to_pages_model');
$fields = parent::form_fields();
$fields['date_added']['type'] = 'hidden';

// ******************* NEW RELATED DOCUMENT FIELD BEGIN *******************

$CI =& get_instance();
$CI->load->model('documents_model');
$CI->load->model('documents_to_pages_model');

$document_options = $CI->documents_model->options_list('id', 'title', array('active' => 'yes'), 'title');
$document_values = (!empty($values['id'])) ? array_keys($CI->documents_to_pages_model->find_all_array_assoc('document_id', array('page_id' => $values['id']))) : array();
$fields['documents'] = array('label' => 'Documents', 'type' => 'array', 'class' => 'add_edit documents', 'options' => $document_options, 'value' => $document_values, 'mode' => 'multi');


// ******************* NEW RELATED DOCUMENT FIELD END *******************

$yes = lang('form_enum_option_yes');
$no = lang('form_enum_option_no');
$fields['cache']['options'] = array('yes' => $yes, 'no' => $no);
return $fields;
}


I imagine the $document_values for the select are not coming back as I expect.

The "documents_to_pages_model" table columns are: id, page_id, document_id, date_added, last_updated]]>
Filter Search not working on one field in a Simple Module http://www.getfuelcms.com/forums/discussion/776/filter-search-not-working-on-one-field-in-a-simple-module Tue, 08 May 2012 15:24:54 -0400 eriklharper 776@/forums/discussions
I even tried putting the number in quotes to see if the search worked, but it didn't. Every other field works fine. Do you know why?

Erik]]>
Hacking the Blog Module to allow Comments on a Book content type http://www.getfuelcms.com/forums/discussion/771/hacking-the-blog-module-to-allow-comments-on-a-book-content-type Sun, 06 May 2012 20:15:37 -0400 eriklharper 771@/forums/discussions
I titled this post as such since I'm looking at a specific way to use the Blog module to my advantage for a client requirement. I'm doing a website for a book author, and they have the following requirements:

1) Each Book has its own full page view with a multitude of different types of information.
2) Each Book has the ability for people to leave a comment
3) Books would need to be rotated on the homepage

Here is the website: http://www.rivannariverbooks.com

My first thought was to create each book as a blog post, which would accomplish the comments objective right away. To improve the aesthetics and flexibility of this requirement, however, I thought I would look into ways that I can "hack" the functionality of the blog module to allow the commenting feature to work in either of two cases:

1) If each Book was created as a Page
2) If each Book was created in a Simple Module

I am not sure which of the above 2 configurations would be better from a simplicity and flexibility standpoint, but I am leaning towards #2 because I want the client to be able to manage their own Books and thus would need to setup a simple module for storing the Book information and control what books display on the homepage, etc.

Since the Blog documentation is fairly basic, can anyone give me some tips as to how to approach a feature like this? Is there a way to create a Simple Module that allows for comments, but doesn't re-write the whole comments module from scratch?

FYI, I have a good familiarity with Simple Modules (and I've created some advanced ones as well).

Thanks!
Erik]]>
CodeIgniter Sparks in FuelCMS http://www.getfuelcms.com/forums/discussion/486/codeigniter-sparks-in-fuelcms Wed, 12 Oct 2011 12:16:18 -0400 mphillips 486@/forums/discussions Wierd AJAX return http://www.getfuelcms.com/forums/discussion/773/wierd-ajax-return Mon, 07 May 2012 07:46:31 -0400 lstables 773@/forums/discussions
// INCLUDED IN THE MODULE CONFIG

'js_controller'=>'ProductController'

// THE ACTUAL ProductController.js

fuel.controller.ProductController = jqx.createController(fuel.controller.BaseFuelController, {
init: function(initObj){
this._super(initObj);
},

items : function(){
// call parent
fuel.controller.BaseFuelController.prototype.items.call(this);
//fuel.controller.BaseFuelController.prototype.items();
var _this = this;
$('#product_subcategory').change(function(e){
$('#form_table').submit();
});
},

add_edit : function(){
// call parent
fuel.controller.BaseFuelController.prototype.add_edit.call(this);
var origParentId = $('#product_subcategory').val();
var id = 5;
$('#product_category').change(function(e){
var category=$('#product_category').val();
category=category.replace(' ','_');
var path = jqx.config.basePath + '/products/getsubcat/' + category;
$('#product_subcategory').parent().load(path);
});
},

upload : function(){
this._notifications();
this._initAddEditInline($('#form'));
}
});

// THE MODEL

// Show Subcats
$fields['product_subcategory'] = array(
'label'=>'Product Subcategory',
'type'=>'select',
'options'=>$this->getsubcats($values['product_category'],$values['product_subcategory']),
'order' => '12'
);


// THE FUNCTION WITHIN THE MODEL

function getsubcats($cat,$sub) {
$subcats=array();
$q=$this->db->get_where('fuel_product_categories',array('category_name'=>$cat));
foreach($q->result() as $row) {
if($sub!=$row->subcategory_name) {
$subcats[$row->subcategory_name]=$row->subcategory_name;
}
}
$subcats[$sub]=$sub;
return $subcats;
}




All the ID's are set correctly in the fields!

Thanks]]>
Customizing using form builder http://www.getfuelcms.com/forums/discussion/772/customizing-using-form-builder Mon, 07 May 2012 01:47:51 -0400 sid4it 772@/forums/discussions The fields that are displayed are dependent on user choosing from a dropdown field.
Ex:
Simple model
custom_users_model
id
types (1,2,all)
field1
field2
field3
field4

if user chooses type =1
field1 should be visible)
if user chooses type 2
field 2 is displayed.
if user chooses type =all
field1-field4 should be visible)

I did something like this..
$type_options = $CI->types_model->options_list('id', 'name');
$fields['type_id'] = array('type' => 'select', 'options' => $type_options, 'onClick' => 'chosefieldsBasedOnType(this)');

But -- was not able to over ride functionality - I know easy way out is to write a custom form - but want to leverage the framework..

please help - what is the best way to move forward.]]>
In-Line Editing Issue - Site Variable http://www.getfuelcms.com/forums/discussion/770/in-line-editing-issue-site-variable Sun, 06 May 2012 12:50:43 -0400 amoist 770@/forums/discussions
echo fuel_var('test',true,'default_value') ;

Failed to load resource: the server responded with a status of 404 (Not Found) - /fuel/default/inline_edit/test/0

Any suggestions would be appreciated. Thank you]]>
Enum Select http://www.getfuelcms.com/forums/discussion/769/enum-select Sun, 06 May 2012 11:43:43 -0400 lstables 769@/forums/discussions
I have a database table with a field with a list of enum values i.e

Cat 1
Cat 2
Cat 3
Cat 4
Cat 5

OK When the form gets created by default you will see a nice auto select with the above options.

If I then want to add a reference in to customize that field i.e

$fields['category'] = array('label'=>'Category','type'=>'select','options'=>'','','order' => '11');

The options field is blank. How do I get the system to auto fill the select with the values in the enum list within the database?

Thanks

]]>