Adding PHP include statement into a certain script

Discussion in 'Programming' started by LittlBUGer, Sep 11, 2007.

  1. #1
    Hello. I don't know if anyone here is familiar with the downloads script RW Download ( http://www.rwscripts.com ), but in any case I need help with it. The way the main global template for the skin/theme works, as far as I can tell, is that it allows you to edit a .htm file with standard HTML and it then has some custom tags put in which are loaded from other areas/files within the script. This .htm file is loaded into the index.php file that the site is based off of (like my site). What I'm trying to do is add a simple line like:

    
    <? include ("display.php"); ?>
    
    Code (markup):
    I want this added into a certain section of the main global template .htm file. Obviously I can't add it like it is above and I can't seem to get it working via SSI as SSI seems to blow up the whole script (unless I'm doing something wrong). I don't really know PHP all that well and am more of a beginner-intermediate of programming in VB.NET and ASP.NET.

    Can someone please help me with this? How do I get that simple PHP include code into the global template .htm file? Any suggestions are welcome. Thanks. :)
     
    LittlBUGer, Sep 11, 2007 IP
  2. sea otter

    sea otter Peon

    Messages:
    250
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I took a quick look at the faq on their site: http://www.rwscripts.com/docs/index.php?title=Main_Page

    Apparently you can create custom tags via the admin panel, which you can then insert into your htm pages.

    Perhaps you can create a custom tag, assign to it whatever you planned on displaying in display.php, and then put that tag in the htm template file?
     
    sea otter, Sep 11, 2007 IP
  3. LittlBUGer

    LittlBUGer Peon

    Messages:
    306
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, it's not so much tags as download fields which should really only be entered in the file description area, at least that's how I've done it before. I'm not sure if anything has changed in this area but I'll see if I can maybe hack around this.

    Otherwise, you can create plugins that are supposed to allow this type of thing but I can't seem to figure it out and to me it looks as though the plugins only work for other already established skin areas and not the global template in general. Maybe I'm just reading it wrong, I don't know.

    Thanks for the suggestion though. :)
     
    LittlBUGer, Sep 11, 2007 IP
  4. Psych0

    Psych0 Banned

    Messages:
    99
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hmm try changing the extension of global.htm to global.php
    i think that code might not work properly on htm files.
     
    Psych0, Sep 12, 2007 IP
  5. LittlBUGer

    LittlBUGer Peon

    Messages:
    306
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    OK, I don't think you understand. It's not that easy. The script is expecting a main.htm file, not a main.php file to be inserted into the index.php file that is generated when people visit my site. I can't change how the script works. That would have been the first thing I would have done if it would have worked. Thanks though. Any other suggestions? :)
     
    LittlBUGer, Sep 12, 2007 IP
  6. Psych0

    Psych0 Banned

    Messages:
    99
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    maybe u should pm me the function of whole script then ill see whats the problem in it.
     
    Psych0, Sep 14, 2007 IP
  7. LittlBUGer

    LittlBUGer Peon

    Messages:
    306
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    The function of whole script? You mean actually give you a copy? I'm sorry, but I can't do that due to legal reasons (it requires a license and will only run with a proper license, etc.). Is there some portion of it you need to see? Maybe the default main.htm file? Thanks.
     
    LittlBUGer, Sep 14, 2007 IP