Example #1
0
 function copyselectedurl($config = array())
 {
     need_login('ajax_page');
     global $base_root;
     $ids = $this->getPost('sel_id');
     if (!$ids || count($ids) == 0) {
         ajax_box(lang('copyimg:pls_sel_photo_want_to_copy'));
     } else {
         $site_url = $this->setting->get_conf('site.url');
         $mdl_photo =& loader::model('photo');
         $ids = array_keys($ids);
         $html = '';
         $urls = '';
         $ubb = '';
         foreach ($ids as $id) {
             $pic = $mdl_photo->get_info($id);
             $img_path = img_path($pic['path']);
             $html_code = $config['tpl'];
             $html_code = str_replace('{thumbpath}', img_path($pic['thumb']), $html_code);
             $html_code = str_replace('{imgpath}', $img_path, $html_code);
             $html_code = str_replace('{imgname}', $pic['name'], $html_code);
             $html_code = str_replace('{detailurl}', $base_root . site_link('photos', 'view', array('id' => $pic['id'])), $html_code);
             $html .= $html_code . $config['split'];
             $urls .= $img_path . "\r\n";
             $ubb .= '[IMG]' . $img_path . "[/IMG]\r\n";
         }
         $this->output->set('img_url', $urls);
         $this->output->set('img_html', $html);
         $this->output->set('img_ubb', $ubb);
         loader::view('copyimg:copyurlall');
     }
 }
 /**
  * Returns an array for Form_builder to use in rendering
  *
  * @access	public
  * @param	array 	Parameters for rendering
  * @return	array
  */
 function frontend_render($field_model, $create = FALSE)
 {
     $field = $field_model->values();
     $field['type'] = 'date';
     $field['class'] = 'date';
     // may remove if we ever decide to add it as a configuration parameter
     $field['js'] = '<script>imgPath = "' . img_path('', FUEL_FOLDER) . '";</script>';
     $field['show_on'] = 'focus';
     return $field;
 }
Example #3
0
 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Routing\Router $router
  * @return void
  */
 public function map(Router $router)
 {
     #if (!$this->app->routesAreCached()) {
     // Handle legacy routes
     $router->get('blog/wp-content/uploads/{img_ref_path}', function ($img_ref_path) {
         return file_get_contents(img_path($img_ref_path));
     });
     $router->group(['namespace' => $this->namespace], function ($router) {
         if (in_array(Input::server('HTTP_HOST'), ['www.joejiko.com', 'local.joejiko.com'])) {
             require_once __DIR__ . '/../Http/routes.php';
         }
     });
     #}
 }
Example #4
0
	<meta name="keywords" content="<?php 
echo fuel_var('meta_keywords');
?>
">
	<meta name="description" content="<?php 
echo fuel_var('meta_description');
?>
">

	<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>
	<?php 
echo css('main') . css($css);
if (!empty($is_blog)) {
    echo $CI->fuel_blog->header();
}
?>

</head>
<body>
	<div class="page">
		<div class="wrapper">
			<header class="page_header">
				<div class="logo"><object type="image/svg+xml" width="160" height="145" data="<?php 
echo img_path('_template_icons.svg#fuel');
?>
"></object></div>
				<h1><?php 
echo fuel_var('heading');
?>
</h1>
			</header>		
Example #5
0
?>
" alt="Layouts" /> <a href="<?php 
echo fuel_url('users');
?>
">Users &amp; Permissions</a></h2>
<p>FUEL CMS users are created in the users module in the admin. A single user can subscribe to as many permissions as necessary however, the permissions to manage users and permisisons
gives a user admin level control so use wisely. Furthermore, certain permissions may not be applicable to your setup.</p>

<h2 id="cache" class="ico ico_manage_cache"><img src="<?php 
echo img_path('icons/ico_page_lightning.png', 'fuel');
?>
" alt="Layouts" /> <a href="<?php 
echo fuel_url('manage/cache');
?>
">Page Cache</a></h2>
<p>FUEL CMS uses a cache to speed up the delivery of pages. Sometimes changes are made to static layouts or blocks and your changes may not be immediately reflected. This is most likely
related to the cache which can be <a href="<?php 
echo fuel_url('manage/cache');
?>
">cleared here</a>.</p>

<h2 id="settings" class="ico ico_settings"><img src="<?php 
echo img_path('icons/ico_table_gear.png', 'fuel');
?>
" alt="Layouts" /> <a href="<?php 
echo fuel_url('settings');
?>
">Settings</a></h2>
<p>Although it's unlikely you'll need to worry too much about this, some modules have extra configuration settings you can manage in the CMS. For example, you may have a blog settings area if the blog is installed.</p>

</p>

<p>For inline editing to work, you must be logged into FUEL and have the proper permissions to edit the page or module information. 
A <span style="background: transparent url(<?php 
echo img_path('ico_pencil.png', FUEL_FOLDER);
?>
) no-repeat; display: inline-block; height: 16px; width: 16px;"></span> pencil icon
will appear over editable areas when the editing for the page is toggled on. Clicking on the icon will overlay a form over your page to edit the values in context.</p>

<h2>Page Inline Editing</h2>
<p>Page inline editing allows you to edit the values of variables used in the page.
A FUEL logo will be displayed in the upper right area of the page that can slide out and provide you 
the ability to toggle inline editing, publish status and caching. Clicking the inline editing pencil will toggle inline editing on.</p>
<img src="<?php 
echo img_path('examples/page_inline_editing.jpg', 'user_guide');
?>
" class="screen" />

<h2>Module Inline Editing</h2>
<p>For those pages that may not be editible, you can still allow for module data to be edited (e.g. news items).
The top right area <strong>will not</strong> have the controls for page publish status, caching or layouts and will look like the following:</p>
<img src="<?php 
echo img_path('examples/inline_editing.jpg', 'user_guide');
?>
" class="screen" />

<p>Clicking the pencil will reveal the form to edit the module information.</p>
<img src="<?php 
echo img_path('examples/inline_editing_form.jpg', 'user_guide');
?>
" class="screen" />
 /**
  * Add FUEL specific changes to the form_fields method
  *
  * @access	public
  * @param	string
  * @param	int
  * @return	boolean
  */
 function form_fields($values = array(), $related = array())
 {
     $fields = parent::form_fields($values, $related);
     $order = 1;
     // create default images
     $upload_path = assets_server_path('', 'images');
     $order = 1;
     foreach ($fields as $key => $field) {
         $fields[$key]['order'] = $order;
         // get field names that end with _image
         if ($fields[$key]['type'] == 'string' and substr($key, -5) == 'image' or substr($key, -3) == 'img') {
             $img = '';
             if (!empty($values['id'])) {
                 if (!empty($values[$key])) {
                     $img = '<div class="img_display"><img src="' . img_path($values[$key]) . '" style="float: right;"/></div>';
                 }
             }
             $fields[$key]['class'] = 'asset_select';
             $order++;
             $fields[$key . '_upload'] = array('order' => $order, 'before_html' => $img, 'label' => '... OR upload an image', 'upload_path' => $upload_path, 'type' => 'file', 'overwrite' => TRUE);
         }
         $order++;
     }
     $yes = lang('form_enum_option_yes');
     $no = lang('form_enum_option_no');
     if (isset($fields['published'])) {
         $fields['published']['order'] = 9999;
         $fields['published']['options'] = array('yes' => $yes, 'no' => $no);
     }
     if (isset($fields['active'])) {
         $fields['active']['order'] = 9999;
         $fields['active']['options'] = array('yes' => $yes, 'no' => $no);
     }
     return $fields;
 }
        	<h1 class="module">Experimentalvortrag</h1>
            <div class="article">
                <p>
                    Am Montag, den 28.02.2011 erklärten sich die ausgebildeten Pyrotechniker der Feuerwehr Bad Soden Andreas Henning und Manuel Napp bereit, einen Experimentalvortrag für die Jugendfeuerwehr zu halten.
                    Los ging es mit der theoretischen und praktischen Vorstellung der fünf Brandklassen: feste Stoffe, flüssig oder flüssig werdende Stoffe, gasförmige Stoffe, Brände von Metallen und Brände von 
                    Speiseölen / fetten. Hierbei wurden zunächst die Eigenschaften einzelner Stoffe jeder Brandklasse beschrieben und anschließend in einem praktischen Versuch dargestellt, wie der Stoff entzündet wird, 
                    wie man ihn wieder löschen kann, aber vor allem, mit welchem Löschmittel man keinen Erfolg haben würde. Das ist im besonders Bereich der Gefahrstoffe ein wichtiger Punkt, aber hierzu später mehr.
                </p>
               	<p class="smallimages">
                    <img src="<?php 
echo img_path('nachwuchs/content_jugend_A_small.jpg');
?>
" style="float: left;" />
                    <img src="<?php 
echo img_path('nachwuchs/content_jugend_B_small.jpg');
?>
" style="float: left;" />
                    <hr class="clear" />
                </p>
                <p>
                    Nach dem Thema Brandklassen wurde noch kurz auf die Eigenschaften von Dämpfen eingegangen. Anhand zweier Versuche, bei der eine Kerze tiefer als ein flüssiger Stoff gestellt wurde, 
                    konnte man gut erkennen, dass Dämpfe schwerer als Luft sind. Das Benzin was im Vergleich zur Kerze erhöht gelagert war, fing nach einer kurze Zeit durch die abwärts fließenden Dämpfe Feuer.
                    Zum Schluss durften die Jugendlich noch eine Mülltonne löschen, die nach geglaubtem Löscherfolg wieder anfing zu brennen. Anschließend wurde dargestellt, wie ein Stoff, der nicht mit Wasser 
                    in Berührung kommen darf, reagiert, wenn es doch einmal dazu kommen sollte.
                </p>
                <p>
                    Die Jugendfeuerwehr bedankt sich bei den beiden Kameraden für einen spannenden und informativen Abend und freut sich schon auf den nächsten Vortrag dieser Art.
                </p>
            </div>
           <hr class="clear" />
Example #9
0
echo form_label('Image' . lang('bf_form_label_required'), 'banner_image', array('class' => 'control-label'));
?>
				<div class='controls'>
					<input id='banner_image' type='text' name='banner_image' maxlength="255" value="<?php 
echo set_value('banner_image', isset($banner['image']) ? $banner['image'] : '');
?>
" />
					<span class='help-inline'><?php 
echo form_error('image');
?>
</span>
                                        <a class="btn btn-primary" id="image_btn_chooser" data-target="banner_image" href="#">Add Image</a>
                                        <div class="box_popup" id="banner_image_box" style="display:none">
                                            <h2>Media List <a class="closeme" href="#">x</a></h2>
                                            <header style="display:none;"><img src="<?php 
echo img_path();
?>
ajax-loader.gif" /></header>
                                            <article>
                                                
                                            </article>
                                           
                                            <!--<h2><input type="button" id="done_file" class="btn btn-primary"  value="Done" ></h2>-->
                                        </div>
				</div>
                            <div class='controls' id="file_box">
                                            
                            </div>
			</div>

			<div class="control-group <?php 
 function get_image_path()
 {
     return img_path($this->image);
 }
Example #11
0
<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="utf-8">
    <title>Inscription sur le site NINFO</title>
</head>
<body>
    <table border="0" align="center" cellpadding="0" cellspacing="0" style="width:640px;font-family:Century Gothic,Verdana, Geneva, sans-serif;">
        <tr>
            <td align="center" style="text-align: center;">
                <a href=""><img width="445" height="57" src="<?php 
echo img_path('logo-agencora.png');
?>
"/></a>
            </td>
        </tr>
        <tr>
            <td>
                <br/><br/>
                <h2>Bonjour <?php 
echo $firstname . ' ' . $lastname;
?>
</h2>
                <p>Un compte vous a été créé par NINFO pour pouvoir accéder à son site.</p>
                <hr>
                <p><?php 
echo $message_mail;
?>
</p>
                <p>Vos identifiants:</p>
                <ul>
Example #12
0
	<img src="<?php 
echo img_path('screens/screen_pages_list.jpg', FUEL_FOLDER);
?>
" class="screen" />
</div>

<a name="edit_view"></a>
<h2>Module Edit View</h2>
<p>Below is an edit view for a page item.</p>
<div class="screenshot">
	<div class="overlay" style="top: 12px; left: 540px;">Actions Bar</div>
	<div class="overlay" style="top: 45px; left: 951px;">Select Other Module Items</div>
	<div class="overlay" style="top: 112px; left: 756px;">Restore From Previous</div>
	<div class="overlay" style="top: 245px; left: 650px;">Editing Form</div>
	<div class="overlay" style="top: 7px; left: 360px;">Breadcrumb</div>
	<img src="<?php 
echo img_path('screens/screen_page_edit.jpg', FUEL_FOLDER);
?>
" class="screen" />
</div>

<h2>Edit User Permissions</h2>
<p>Below is the edit user view.</p>
<div class="screenshot">
	<div class="overlay" style="top: 255px; left: 560px;">User Information</div>
	<div class="overlay" style="top: 505px; left: 560px;">Permissions</div>
	<img src="<?php 
echo img_path('screens/screen_users.jpg', FUEL_FOLDER);
?>
" class="screen" />
</div>
Example #13
0
<h1>Assets</h1>
<p>The Assets module allows you to manage the images, css, and javascript for your sites. You must set the asset folders you want managed
to have writable permissions. </p>

<img src="<?php 
echo img_path('examples/screen_assets.jpg', 'user_guide');
?>
" class="screen" />
Example #14
0
 /**
  * Renders the inline editing markers before final output
  *
  * @access	public
  * @param	string	The output to be rendered
  * @return	string
  */
 public function fuelify($output)
 {
     // if not logged in then we remove the markers
     if (!$this->fuel->config('admin_enabled') or $this->variables('fuelified') === FALSE or !$this->_fuelified or empty($output) or defined('FUELIFY') and FUELIFY === FALSE) {
         return $this->remove_markers($output);
     }
     $this->CI->load->helper('convert');
     // add top edit bar for fuel
     $this->CI->config->module_load('fuel', 'fuel', TRUE);
     // render the markers to the proper html
     $output = $this->render_all_markers($output);
     // set main image and assets path before switching to fuel assets path
     $vars['init_params'] = array('assetsImgPath' => img_path(''), 'assetsPath' => assets_path(''));
     $orig_asset_path = $this->CI->asset->assets_path;
     $this->CI->asset->assets_path = $this->fuel->config('fuel_assets_path');
     $this->CI->load->helper('ajax');
     $this->CI->load->library('form');
     $last_page = uri_path();
     if (empty($last_page)) {
         $last_page = $this->fuel->config('default_home_view');
     }
     $vars['last_page'] = uri_safe_encode($last_page);
     if (!$this->_fuelified_processed) {
         // create the inline edit toolbar
         $inline_edit_bar = $this->fuel->admin->toolbar();
         $fuel_js_obj = "<script>if (typeof fuel == 'undefined') fuel = {}</script>\n";
         $inline_css = css('fuel_inline', 'fuel', array('output' => $this->fuel->config('fuel_assets_output')));
         $output = preg_replace('#(</head>)#i', $fuel_js_obj . $inline_css . "\n\$1", $output);
         $output = preg_replace('#(</body>)#i', $inline_edit_bar . "\n\$1", $output);
         $this->CI->config->set_item('assets_path', $this->CI->config->item('assets_path'));
     }
     $this->_fuelified_processed = TRUE;
     $this->CI->asset->assets_path = $orig_asset_path;
     return $output;
 }
Example #15
0
 function fuelify($output)
 {
     // if not logged in then we remove the markers
     if (!$this->_CI->config->item('admin_enabled', 'fuel') or $this->variables('fuelified') === FALSE or !$this->_fuelified or empty($output) or defined('FUELIFY') and FUELIFY === FALSE) {
         return $this->remove_markers($output);
     }
     $this->_CI->load->library('session');
     // add top edit bar for fuel
     $this->_CI->config->module_load('fuel', 'fuel', TRUE);
     // render the markers to the proper html
     $output = $this->render_all_markers($output);
     // set main image and assets path before switching to fuel assets path
     $vars['init_params'] = array('assetsImgPath' => img_path(''), 'assetsPath' => assets_path(''));
     $this->_CI->asset->assets_path = $this->_CI->config->item('fuel_assets_path', 'fuel');
     $this->_CI->load->helper('ajax');
     $this->_CI->load->library('form');
     $vars['page'] = $this->properties();
     $vars['layouts'] = $this->_CI->fuel_layouts->layouts_list(TRUE);
     $editable_asset_types = $this->_CI->config->item('editable_asset_filetypes', 'fuel');
     // add javascript
     $vars['init_params']['pageId'] = !empty($vars['page']['id']) ? $vars['page']['id'] : 0;
     $vars['init_params']['basePath'] = WEB_PATH;
     $vars['init_params']['imgPath'] = img_path('', 'fuel');
     $vars['init_params']['cssPath'] = css_path('', 'fuel');
     $vars['init_params']['jsPath'] = js_path('', 'fuel');
     $vars['assetsAccept']['assetsAccept'] = !empty($editable_asset_types['media']) ? $editable_asset_types['media'] : 'jpg|gif|png';
     // database specific... so we must check the fuel mode to see if we actually need to make a call to the database.
     // otherwise we get an error when the mode is set to views
     if ($this->_CI->config->item('fuel_mode', 'fuel') == 'views') {
         $vars['others'] = array();
     } else {
         $this->_CI->load->module_model(FUEL_FOLDER, 'pages_model');
         $vars['others'] = $this->_CI->pages_model->get_others('location', $this->location, 'location');
     }
     if (!$this->_fuelified_processed) {
         $inline_edit_bar = $this->_CI->load->module_view(FUEL_FOLDER, '_blocks/inline_edit_bar', $vars, TRUE);
         $output = str_replace('</head>', css('fuel_inline', 'fuel') . "\n</head>", $output);
         $output = str_replace('</body>', $inline_edit_bar . "\n</body>", $output);
         $this->_CI->config->set_item('assets_path', $this->_CI->config->item('assets_path'));
     }
     $this->_fuelified_processed = TRUE;
     return $output;
 }
Example #16
0
							<p>To change the contents of this homepage, edit the <strong>fuel/application/views/home.php</strong> file.</p>

							<p>Happy coding!</p>
						</div>
					</li>
				</ol>
			</section>
		</div>
	</div>
	<div class="wrapper">
	<footer class="row footer">
		<nav class="mainnav">
			<ul>
				<li class="first active"><a href="http://www.getfuelcms.com" target="_blank">Home</a></li>
				<li><a href="http://getfuelcms.com/features" target="_blank">Features</a></li>
				<li><a href="http://getfuelcms.com/developers" target="_blank">Developers</a></li>
				<li><a href="http://getfuelcms.com/support" target="_blank">Support</a></li>
				<li class="last"><a href="http://getfuelcms.com/blog" target="_blank">Blog</a></li>
			</ul>
		</nav>
		<p class="colophon">FUEL CMS is developed with love by <a href="http://thedaylightstudio.com" target="_blank">Daylight Studio</a> <object type="image/svg+xml" width="25" height="25" data="<?php 
echo img_path('_template_icons.svg#daylight');
?>
"></object> &copy; <?php 
echo date("Y");
?>
 Run for Daylight LLC, All Rights Reserved.</p>
	</footer>
</div>
</body>
</html>
Example #17
0
	<?php 
echo js('jquery/jquery', FUEL_FOLDER);
?>
	<?php 
echo js('jqx/jqx', FUEL_FOLDER);
?>
	<script type="text/javascript">
		jqx.addPreload('fuel.controller.BaseFuelController');
		jqx.init('fuel.controller.LoginController', {});
	</script>
</head>
<body>
<div id="login">
	<div id="login_inner">
		<img src="<?php 
echo img_path('fuel_logo.jpg');
?>
" width="400" height="100" alt="FUEL CMS" border="0" id="login_logo" />
		<div id="login_notification" class="notification">
			<?php 
echo $notifications;
?>
		</div>
		<?php 
echo $form;
?>
		<a href="<?php 
echo fuel_url('auth/pwd_reset');
?>
"></a>
	</div>
Example #18
0
// User info
define('IMAGE_profile', '<img src="' . img_path('profile.png') . '" alt="' . LAN_398 . '" title="' . LAN_398 . '" />');
define('IMAGE_email', '<img src="' . img_path('email.png') . '" alt="' . LAN_397 . '" title="' . LAN_397 . '" />');
define('IMAGE_website', '<img src="' . img_path('website.png') . '" alt="' . LAN_396 . '" title="' . LAN_396 . '" />');
// action
define('IMAGE_pm', '<img src="' . img_path('pm.png') . '" alt="' . LAN_399 . '" title="' . LAN_399 . '" class="icon S16 action" />');
define('IMAGE_edit', '<img src="' . img_path('edit.png') . '" alt="' . LAN_400 . '" title="' . LAN_400 . '" class="icon S16 action" />');
define('IMAGE_quote', '<img src="' . img_path('quote.png') . '" alt="' . LAN_401 . '" title="' . LAN_401 . '" class="icon S16 action" />');
define('IMAGE_track', '<img src="' . img_path('track.png') . '" alt="' . LAN_392 . '" title="' . LAN_392 . '" class="icon S16 action" />');
define('IMAGE_untrack', '<img src="' . img_path('untrack.png') . '" alt="' . LAN_391 . '" title="' . LAN_391 . '" class="icon S16 action" />');
define('IMAGE_admin_edit', '<img src="' . img_path('admin_edit.png') . '" alt="' . LAN_406 . '" title="' . LAN_406 . '" class="icon S16 action" />');
define('IMAGE_admin_move', '<img src="' . img_path('admin_move.png') . '" alt="' . LAN_402 . '" title="' . LAN_402 . '" class="icon S16 action" />');
define('IMAGE_admin_split', '<img src="' . img_path('admin_split.png') . '" alt="' . FORLAN_105 . '" title="' . FORLAN_105 . '" class="icon S16 action" />');
define('IMAGE_admin_move2', '<img src="' . img_path('admin_move.png') . '" alt="' . LAN_408 . '" title="' . LAN_408 . '" class="icon S16 action" />');
define('IMAGE_report', '<img src="' . img_path('report.png') . '" alt="' . LAN_413 . '" title="' . LAN_413 . '" class="icon S16 action" />');
define('IMAGE_attachment', '<img src="' . img_path('attach.png') . '" alt="" title="" class="icon S16 action" />');
define('IMAGE_post', '<img src="' . img_path('post.png') . '" alt="" title="" />');
define('IMAGE_post2', '<img src="' . img_path('post2.png') . '" alt="" title="" class="icon S16 action" />');
// Admin <input> Icons
define('IMAGE_admin_delete', 'src="' . img_path('admin_delete.png') . '" alt="' . LAN_435 . '" title="' . LAN_435 . '" ');
define('IMAGE_admin_unstick', 'src="' . img_path('admin_unstick.png') . '" alt="' . LAN_398 . '" title="' . LAN_398 . '" ');
define('IMAGE_admin_stick', 'src="' . img_path('admin_stick.png') . '" alt="' . LAN_401 . '" title="' . LAN_401 . '" ');
define('IMAGE_admin_lock', 'src="' . img_path('admin_lock.png') . '" alt="' . LAN_399 . '" title="' . LAN_399 . '" ');
define('IMAGE_admin_unlock', 'src="' . img_path('admin_unlock.png') . '" alt="' . LAN_400 . '" title="' . LAN_400 . '" ');
// Multi Language Images
define('IMAGE_newthread', '<img src="' . img_path('newthread.png') . '" alt="' . FORLAN_10 . '" title="' . FORLAN_10 . '" />');
define('IMAGE_reply', '<img src="' . img_path('reply.png') . '" alt="" title="" />');
define('IMAGE_rank_moderator_image', '<img src="' . img_path('moderator.png', '', 'rank_moderator_image') . '" alt="" />');
define('IMAGE_rank_main_admin_image', '<img src="' . img_path('main_admin.png', '', 'rank_main_admin_image') . '" alt="" />');
define('IMAGE_rank_admin_image', '<img src="' . img_path('admin.png', '', 'rank_admin_image') . '" alt="" />');
Example #19
0
">allowed by default</a>, however you can use FUEL's
<a href="<?php 
echo user_guide_url('parsing');
?>
">parsing syntax</a>. Page variables can be <a href="<?php 
echo user_guide_url('general/inline-editing');
?>
">edited inline</a> 
if their layout uses the <a href="<?php 
echo user_guide_url('helpers/fuel_helper');
?>
">fuel_var</a> function to set the variables locations in the layout.

</p>
<img src="<?php 
echo img_path('examples/screen_page_edit.jpg', 'user_guide');
?>
" class="screen" />

<h2>Importing Existing Views</h2>
<p>If you are using <a href="<?php 
echo user_guide_url('general/opt-in-controller');
?>
">Opt-in Controllers</a>, 
a view file that matches the URI location will trigger a prompt to import that view to edit if the modified date is after the pages last modified date.
This is a convenient way to make edits outside of the admin interface and import them.</p>
<img src="<?php 
echo img_path('examples/screen_page_import.jpg', 'user_guide');
?>
" class="screen" />
<a href="http://www.getfuelcms.com" target="_blank"><img src="<?php 
echo img_path('fuel_logo.png', 'user_guide');
?>
" id="fuel_logo" title="Visit getfuelcms.com" alt="FUEL CMS" /></a>
<h1>Table of Contents</h1>

<?php 
$this->load->module_view(USER_GUIDE_FOLDER, '_blocks/main_toc');
Example #21
0
method (note the preceding underscore) that can be called in which you pass it one of those values. For this example, we want a tree view that groups the articles
based on the tags. </p>
<pre class="brush: php">
... 
function tree()
{
    return $this->_tree('has_many');
}
...
</pre>
<p></p>
<p class="important">You could create a tree view grouped by authors if you pass the <dfn>_tree</dfn> method "foreign_keys" instead.</p>

<p>The tree method will render like the following in the FUEL admin:</p>
<img src="<?php 
echo img_path('screens/articles_tree.png', FUEL_FOLDER);
?>
" class="screen" />


<h3>Adding to the Record Object</h3>
<p>The last addition we will make to the articles model will be to add several <strong>record methods</strong>.
The first will be <dfn>get_url</dfn> which will give us a single place to control URLs to articles.
The second and third methods will be to generate proper image paths for the a view:</p>

<pre class="brush: php">
... 
class Article_model extends Data_record {
  
  public function get_url()
  {
Example #22
0
<h1>Blocks</h1>
<p>Blocks are repeatable areas of your site that you can embed into your pages using the <a href="<?php 
echo user_guide_url('helpers/fuel_helper');
?>
">fuel_block</a> function.</p>
<img src="<?php 
echo img_path('examples/screen_block.jpg', 'user_guide');
?>
" class="screen" />
    ?>
 advanced<?php 
}
?>
">
						<?php 
echo $this->form->search('search_term', $params['search_term'], 'placeholder="' . lang('label_search') . '"');
?>
						<?php 
if ($this->advanced_search === TRUE or $this->advanced_search === 'popover') {
    ?>
						<a href="#" id="adv-search-btn" title="<?php 
    echo lang('adv_search');
    ?>
"><img src="<?php 
    echo img_path('th_arrow_desc.png', FUEL_FOLDER);
    ?>
" /></a>
						<div class="adv_search">
							<p><strong><?php 
    echo lang('adv_search');
    ?>
</strong></p>
							<?php 
    $this->load->module_view(FUEL_FOLDER, '_blocks/search_filters');
    ?>
							<p><?php 
    echo $this->form->submit(lang('btn_search'), 'search');
    ?>
 &nbsp;&nbsp; <a href="#" id="adv-search-close"><?php 
    echo lang('viewpage_close');
 /**
  * Displays related items on the right side
  *
  * @access	public
  * @param	array View variable data (optional)
  * @return	mixed Can be an array of items or a string value
  */
 public function related_items($values = array())
 {
     $CI =& get_instance();
     // don't display if it is disabled
     if ($CI->fuel->modules->get('navigation')->info('disabled') === TRUE) {
         return '';
     }
     $CI->load->module_model(FUEL_FOLDER, 'fuel_navigation_model');
     $where['location'] = $values['location'];
     $related_items = $CI->fuel_navigation_model->find_all_array_assoc('id', $where);
     $return = array();
     if (!empty($related_items)) {
         $return['navigation'] = array();
         foreach ($related_items as $key => $item) {
             $label = $item['label'];
             if (!empty($item['group_name'])) {
                 $label .= ' (' . $item['group_name'] . ')';
             }
             $return['navigation']['inline_edit/' . $key] = $label;
         }
     } else {
         if (!empty($values['location']) and $this->fuel->auth->has_permission('navigation', 'create')) {
             $return['navigation'] = array();
             $label = !empty($values['page_vars']['page_title']) ? $values['page_vars']['page_title'] : '';
             $parent_id = 0;
             $group_id = $CI->fuel->config('auto_page_navigation_group_id');
             // determine parent based off of location
             $location_arr = explode('/', $values['location']);
             $parent_location = implode('/', array_slice($location_arr, 0, count($location_arr) - 1));
             if (!empty($parent_location)) {
                 $parent = $this->fuel_navigation_model->find_by_location($parent_location);
             }
             if (!empty($parent)) {
                 $parent_id = $parent['id'];
             }
             $return['navigation']['inline_create?location=' . urlencode($values['location']) . '&label=' . $label . '&group_id=' . $group_id . '&parent_id=' . $parent_id] = lang('navigation_related');
         }
     }
     $view = $this->load->module_view(FUEL_FOLDER, '_blocks/related_items_array', array('related_items' => $return), TRUE);
     $layout = $CI->fuel->layouts->get($values['layout']);
     if (!empty($layout->preview_image)) {
         $img_path = (is_http_path($layout->preview_image) or substr($layout->preview_image, 0, 1) == '/') ? $layout->preview_image : img_path($layout->preview_image);
         $view = '<img src="' . $img_path . '" alt="' . $layout->name() . '" class="layout_preview" />' . $view;
     }
     return $view;
 }
Example #25
0
<h1>Activity Log</h1>
<p>FUEL keeps track of the activity in the system under the Activity Log. This information may be usefuel for debugging purposes. It also
provides recent activity on the dashboard.</p>

<img src="<?php 
echo img_path('examples/screen_logs.jpg', 'user_guide');
?>
" class="screen" />
Example #26
0
">inline editing</a> to our view. To do this we use the <a href="helpers/fuel_helper">fuel_edit</a> function. We'll
place that function right inside the &lt;h1&gt; tag in the article view and inside the &lt;li&gt; in the list view. </p>

<pre class="brush: php">
...
&lt;h2&gt;&lt;?=fuel_edit($article)?&gt;&lt;?=$article-&gt;title?&gt;&lt;/h2&gt;
...
</pre>

<p>Additionally, you may add items in the context of a page. To do that, you pass <dfn>create</dfn> as the first parameter.</p>
<pre class="brush: php">
&lt;h2&gt;&lt;?=fuel_edit('create', 'Create', 'articles')?&gt;&lt;?=$article-&gt;title?&gt;&lt;/h2&gt;
</pre>
<p>Next, make sure the FUEL bar located in the upper right of the page has the pencil icon toggled on. You should now see pencil icons that when clicked, will allow you to edit or add article data from within the context of the page.</p>
<img src="<?php 
echo img_path('screens/page_inline_editing.jpg', FUEL_FOLDER);
?>
" class="screen" />
<p class="important"><a href="<?php 
echo user_guide_url('general/inline-editing');
?>
">Click here for more on inline editing</a></p>
<br />


<p><strong>That's it!</strong></p>


<h2>Now What?</h2>
<p>If you are wanting to create more advanced modules, <a href="<?php 
echo user_guide_url('modules/advanced');
Example #27
0
	foreach($categories_to_articles as $val)
	{
		$attributes = ($val->published == 'no') ? array('class' => 'unpublished', 'title' => 'unpublished') : NULL;
		$return[$i] = array('id' => $i, 'label' => $val->title, 'parent_id' => $val->category_id, 'location' => fuel_url('articles/edit/'.$val->article_id), 'attributes' =>  $attributes);
		$i++;
	}
	return $return;
}
... 
</pre>
<p class="important">Note that we are <strong>not</strong> including uncategorized articles in the tree view. To do that you would need to create another
root level category for uncategorized items.</p>

<p>The tree method will render like the following in the FUEL admin:</p>
<img src="<?php 
echo img_path('examples/articles_tree.png', 'user_guide');
?>
" class="screen" />


<h4>Adding an After Delete Hook</h4>
<p>FUEL's models allow you to add <dfn>hooks</dfn> which are functions that get executed 
when certain events occur. For the articles model, we want to add hook that upon record deletion, 
will also remove all records from the categories_to_articles table associated with that record to keep that table clean.
Below is a method we add to the Articles_model class:
</p>

<pre class="brush: php">
... 
// cleanup articles from categories to articles table
function on_after_delete($where)
Example #28
0
 public function get_image_path()
 {
     return img_path('events/' . $this->image);
 }
Example #29
0
    header('location:' . e_BASE . 'index.php');
    exit;
}
$e_sub_cat = 'forum';
require_once e_ADMIN . 'auth.php';
require_once e_HANDLER . 'userclass_class.php';
require_once e_HANDLER . 'form_handler.php';
require_once e_HANDLER . 'ren_help.php';
require_once e_PLUGIN . 'forum/forum_class.php';
require_once e_PLUGIN . 'forum/forum_admin_class.php';
$emessage = eMessage::getInstance();
$rs = new form();
$for = new e107forum();
$forum = new forumAdmin();
$fPref = e107::getPlugConfig('forum', '', false);
define('IMAGE_new', "<img src='" . img_path('new.png') . "' alt='' />");
define('IMAGE_sub', "<img src='" . e_PLUGIN . "forum/images/forums_16.png' alt='" . FORLAN_145 . "' title='" . FORLAN_145 . "' />");
define('IMAGE_nosub', "<img src='" . e_PLUGIN . "forum/images/sub_forums_16.png' alt='" . FORLAN_145 . "' title='" . FORLAN_145 . "' />");
$deltest = array_flip($_POST);
if (e_QUERY) {
    $tmp = explode('.', e_QUERY);
    $action = $tmp[0];
    $sub_action = $tmp[1];
    $id = $tmp[2];
    unset($tmp);
}
if (isset($_POST['delete'])) {
    $tmp = array_pop(array_flip($_POST['delete']));
    list($delete, $del_id) = explode('_', $tmp);
}
if (isset($_POST['setMods'])) {
Example #30
0
	foreach($categories_to_articles as $val)
	{
		$attributes = ($val->published == 'no') ? array('class' => 'unpublished', 'title' => 'unpublished') : NULL;
		$return[$i] = array('id' => $i, 'label' => $val->title, 'parent_id' => $val->category_id, 'location' => fuel_url('articles/edit/'.$val->article_id), 'attributes' =>  $attributes);
		$i++;
	}
	return $return;
}
... 
</pre>
<p class="important">Note that we are <strong>not</strong> including uncategorized articles in the tree view. To do that you would need to create another
root level category for uncategorized items.</p>

<p>The tree method will render like the following in the FUEL admin:</p>
<img src="<?=img_path('examples/articles_tree.png', 'user_guide')?>" class="screen" />


<h4>Adding an After Delete Hook</h4>
<p>FUEL's models allow you to add <dfn>hooks</dfn> which are functions that get executed 
when certain events occur. For the articles model, we want to add hook that upon record deletion, 
will also remove all records from the categories_to_articles table associated with that record to keep that table clean.
Below is a method we add to the Articles_model class:
</p>

<pre class="brush: php">
... 
// cleanup articles from categories to articles table
function on_after_delete($where)
{
	$this->delete_related('categories_to_articles_model', 'article_id', $where);