Announcement

Collapse
No announcement yet.

PHP In my XML style template file...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • abstrakt
    replied
    Scott, you don't know how much I appreciate this. Thank you, thank you !! It works.

    Leave a comment:


  • Scott MacVicar
    replied
    did you put the code above where the header code is executed?

    PHP is not allowed in the code for purely the reason you've demonstrated above. People buy styles. If the owner was to put say a little bit of extra PHP code in one of the templates he could fetch all the emails of your user and sell them to a spam list etc.

    PHP Code:
    // parse headinclude, header & footer
    eval('$headinclude = "' fetch_template('headinclude') . '";');
    eval(
    '$header = "' fetch_template('header') . '";');
    eval(
    '$footer = "' fetch_template('footer') . '";'); 
    your code has to go above that.

    Leave a comment:


  • abstrakt
    replied
    Okay, I added what you said in the end of global.php and then put this in the template editor via the admincp in my header...

    <p>
    $advert
    <p>

    all I get is blank space in the forum still... I wish this were'nt so complicated. VBulletin Rules, but in phpBB this would'a been said and done with a long time ago.



    I know the admentor script works...
    http://www.gridirontalk.com/test.php

    Leave a comment:


  • Scott MacVicar
    replied
    PHP has never executed in the templates since this would be a huge security hole.

    Can you call the advert another way say by an image tag?

    or you could edit global.php

    require_once("./phpadmentor/phpadmentor_config.php");
    $advert = PhpAdMentor_GetAd("", 2, 0);

    and then use $advert where you want the advert to appear.

    Leave a comment:


  • abstrakt
    replied
    Please...

    Leave a comment:


  • abstrakt
    replied
    Hmm, I am really starting to become frustrated with this. Something so simple is becoming a task and a half to complete. Someone please spell it out for me...

    All I need to do is add this code under my buttons:

    Code:
    <p>
    <? require("phpadmentor/phpadmentor_config.php"); ?>
    <? echo(PhpAdMentor_GetAd("", 2, 0) ); ?>
    <p>
    I tried the way suggested above using the editor in my admincp, and nothing shows up, so instead I took away the PHP tags, and then the script text itself shows up where the banner should be echoing. Why is this so hard !?!?!

    Leave a comment:


  • kennethj
    replied
    Originally posted by kennethj
    as i also bought a script they are NOT "php" they are if and /if statments...

    if use is then else ...

    different
    Code:
    <if condition="$bbuserinfo[userid] == 0">
    went and got an example ... they are used in forum home templts...

    Leave a comment:


  • kennethj
    replied
    Originally posted by abstrakt
    Right, I have the style working properly, and did have to upload some images but where does it create php files for the style so I can add in my code ? I can't seem to find where the files are created.

    Sorry for being a newb...
    as i also bought a script they are NOT "php" they are if and /if statments...

    if use is then else ...

    different

    Leave a comment:


  • Wayne Luke
    replied
    Click on Style Manager and then click on the expand button ("<< >>") to show all the templates. You can edit them right in the admin control panel.

    Leave a comment:


  • abstrakt
    replied
    Hmm, this is whacky. I'm not sure I understand. For instance in my case I need to add a banner script under the buttons of my template. If the template is held in the database how do I modify/customize my layout then ? The way it appears to be setup would suggest I couldn't edit it accordingly - that's not cool.

    Leave a comment:


  • Scott MacVicar
    replied
    the templates are held in the database. You'll need to add your PHP to the actual vBulletin files.

    Leave a comment:


  • abstrakt
    replied
    Right, I have the style working properly, and did have to upload some images but where does it create php files for the style so I can add in my code ? I can't seem to find where the files are created.

    Sorry for being a newb...
    Last edited by abstrakt; Tue 26 Aug '03, 6:12am.

    Leave a comment:


  • Scott MacVicar
    replied
    you import the xml file into the admincp and it will create the style on your board. You may also have to upload some images.

    Leave a comment:


  • abstrakt
    replied
    Thank you, Steve. I am new to vBulletin, where might I find this in my directories ? I bought the style from http://www.vbulletinstyles.com and it came in an xml file... is there something I am missing ?

    I appreciate it.

    this is the one I bought...
    http://www.vbulletinstyles.com/forum...php?styleid=33

    Leave a comment:


  • Steve Machol
    replied
    PHP can only be added to the phpinclude template.

    Leave a comment:

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X