Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where in to place the php code of a plugin?
#1
I'm new to use GetSimple and it looks good!

I have tried to use for example the I18N search plugin and when I place te
(% search %) code on a page, that will be no problem.

But: where, in what file I have to place te php code?
For example the one which shows on the explanation:
PHP Code:
<?php get_search_form(array('slug'=>'search''showTags'=>0)); ?>
Reply
#2
You can put it directly in a template in your theme. Or a component and call it via the theme, or use the dynpages plugin to insert a component on a page.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
I have tried to place the php code, but it won't work. Is ther something going wrong? (sidebar.inc.php)

PHP Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
/****************************************************
*
* @File:             sidebar.inc.php
* @Package:        GetSimple
* @Action:        Innovation theme for GetSimple CMS
*
*****************************************************/
?><aside id="sidebar">

    <div class="section" id="socialmedia" >
        <h2>Connect</h2>
        <div class="icons">
            
            <!-- Social Media URLs are set within this theme's settings plugin -->
            <?php if (defined('FACEBOOK')) { ?>
                <a href="<?php echo FACEBOOK?>"><img src="<?php get_theme_url(); ?>/assets/images/facebook.png" /></a>
            <?php ?>
            <?php if (defined('TWITTER')) { ?>
                <a href="<?php echo TWITTER?>"><img src="<?php get_theme_url(); ?>/assets/images/twitter.png" /></a>
            <?php ?>
            <?php if (defined('LINKEDIN')) { ?>
                <a href="<?php echo LINKEDIN?>"><img src="<?php get_theme_url(); ?>/assets/images/linkedin.png" /></a>
            <?php ?>
            
            <img src="<?php get_theme_url(); ?>/assets/images/break.png" />
            
            <!-- addthis popup - you can add your username if you want analytics: http://www.addthis.com/help/customizing-addthis -->
            <div class="addthis_toolbox" style="display:inline;width:24px;" >
                <a href="//www.addthis.com/bookmark.php?v=250" class="addthis_button_compact"><img src="<?php get_theme_url(); ?>/assets/images/share.png" /></a><br>
                        </div>
            <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script>
        </div>
    </div>
        
    <!-- wrap each sidebar section like this -->
    <div class="section">
        <?php get_component('sidebar');    ?>
    
    
    </div>

       [b] <div>
        <?php get_search_form(array('slug'=>'search''showTags'=>0)); ?>
        </div>[/b]
</aside> 
Reply
#4
hmm, is the plugin enabled ?
Looks ok to me.

You might have to ask in the i18n search thread.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2013-07-19, 01:03:26)shawn_a Wrote: hmm, is the plugin enabled ?
Looks ok to me.

You might have to ask in the i18n search thread.

The plugin is enabled.

I will ask in i18n tread.

Thanks!
Reply




Users browsing this thread: 1 Guest(s)