Jump to content

Editing index.php when adding a new page


Guest harmor

Recommended Posts

If I remember correctly you had to edit "index.php" and add a line of code so when someone type "yoursite.com/forums/index.php?act=somepage" it'll read "somepage.php".
Does 2.2 do the same or can you have "index.php?act=somepage" read "somepage.php" without having to edit "index.php"?

Link to comment
Share on other sites

If I remember correctly you had to edit "index.php" and add a line of code so when someone type "yoursite.com/forums/index.php?act=somepage" it'll read "somepage.php".


Does 2.2 do the same or can you have "index.php?act=somepage" read "somepage.php" without having to edit "index.php"?




You have to edit index.php, but modules were added for this reason. Create your module and you can access if it through index.php?automodule=somepage.
Link to comment
Share on other sites

Someone had a tutorial on how to create a custom page and a template to go along with it. In the tutorial the author said to pass variables when creating a new template. What is the purpose of passing variables for the template?

For those who don't know what I'm talking about go to ACP --> Look & Feel --> Edit Template HTML --> All Global HTML (Can be any template though) --> On the right frame scroll down and select "Add Template Bit".
You should see "New Template Bit Incoming Data Variables" at the top of the frame.

Link to comment
Share on other sites

thats for exactly wot you said passing variables from the php file, a reason for this was say if you had data stored in a mysql db and you wanted to output that to the skins then you can pass the variable in the skin call in the php file and the data will be transferred to the skin. Nearly everything in ipb does this for example data you see in posts is passed from the php file to the skin by a variable to output it on your screens. I've not had a proper rumage yet but i think its been changed in ipb 2.2 so to use a variable in the skin you can just do a $mydata and you'd have to add $mydata="" in the "New Template Bit Incoming Data Variables".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...