Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Innovation Plugin
#2
this is great -
i was able to adapt this into a new plugin for a custom theme, and it perfectly creates the relevant xml file to store the settings...

however for some reason i can't seem to get the template function to read the xml values.

I have this code in my functions.php:

Code:
function Delphic_Settings() {
    $file = GSDATAOTHERPATH . 'DelphicSettings.xml';
    if (file_exists($file)) {
        $p = getXML($file);
        if ($p->facebook != '' ) define('FACEBOOK', $p->facebook);
        if ($p->twitter != '' ) define('TWITTER', $p->twitter);
        if ($p->linkedin != '' ) define('LINKEDIN', $p->linkedin);
        if ($p->flickr != '' ) define('FLICKR', $p->flickr);
        if ($p->dribbble != '' ) define('DRIBBBLE', $p->dribbble);
        return true;
    } else {
        return false;
    }
}

and i have this in my template footer:

Code:
<?php if (defined('TWITTER')) { ?>
          <li><a href="<?php echo TWITTER; ?>"><img src="<?php get_theme_url(); ?>/style/images/icon-twitter.png" alt="" /></a></li>
          <?php } ?>

i can't seem to figure out why this doesn't work...it should be as simple as the functions.php file getting the values from the xml file and then the template using those values...

I also tried using the regular Innovation Plugin on a different template, and copied the functions.php to the other theme folder and copied the code exactly from the Innovation theme, but it doesn't work there either..

would be great to solve this because it could be the beginnings of a generic theme settings plugin that could be used for other themes...

-marc
Reply


Messages In This Thread
Innovation Plugin - by Rene - 2011-05-03, 05:58:46
RE: Innovation Plugin - by cmscss - 2012-11-06, 21:20:12
RE: Innovation Plugin - by Carlos - 2012-11-07, 06:24:22
RE: Innovation Plugin - by Oleg06 - 2012-11-07, 08:23:39
RE: Innovation Plugin - by Carlos - 2012-11-07, 16:50:15
RE: Innovation Plugin - by Oleg06 - 2012-11-07, 18:59:19
RE: Innovation Plugin - by Carlos - 2012-11-08, 04:21:28
RE: Innovation Plugin - by Oleg06 - 2012-11-08, 06:18:25
RE: Innovation Plugin - by cmscss - 2012-11-08, 06:26:07
RE: Innovation Plugin - by Oleg06 - 2012-11-08, 16:19:59
RE: Innovation Plugin - by cmscss - 2012-11-11, 09:15:42
RE: Innovation Plugin - by Oleg06 - 2012-11-11, 15:53:16
RE: Innovation Plugin - by shawn_a - 2012-11-12, 01:38:15
RE: Innovation Plugin - by shawn_a - 2013-04-12, 02:11:34
RE: Innovation Plugin - by Oleg06 - 2014-03-13, 21:00:26
RE: Innovation Plugin - by shawn_a - 2014-03-13, 22:19:04
RE: Innovation Plugin - by Oleg06 - 2014-03-13, 22:25:38
RE: Innovation Plugin - by shawn_a - 2014-03-14, 03:26:59
RE: Innovation Plugin - by shawn_a - 2014-03-14, 03:39:40
RE: Innovation Plugin - by shawn_a - 2014-03-14, 04:12:15
RE: Innovation Plugin - by Oleg06 - 2014-03-14, 04:30:01
Innovation Plugin - by alienee2 - 2012-04-17, 22:37:17



Users browsing this thread: 4 Guest(s)