TinyPortal

Development => Support => Topic started by: jonesguitarman on May 17, 2010, 01:03:41 AM

Title: Adding A new page?
Post by: jonesguitarman on May 17, 2010, 01:03:41 AM
I like how i can hav a front page, but is there a way to add other pages too? i cant seem to figure out how to.

Jones.
Title: Re: Adding A new page?
Post by: ZarPrime on May 17, 2010, 01:14:49 AM
Hi jonesguitarman,

Sure, you can do this.  You can create categories for your articles, and place html, bbc, and php articles into them.  I would recommend taking a look at our Docs site by clicking on the "Docs" link on the top menu here.  Once you get there, click the link for the particular version of TinyPortal that you have (for instance TP 1.0.*) and then look for the link for articles.  If you have any questions after going through those Docs, feel free to ask. ;)

ZarPrime
Title: Re: Adding A new page?
Post by: jonesguitarman on May 17, 2010, 01:24:25 AM
But i want a link in the menu too, like i would want it to be like another front page.


Title: Re: Adding A new page?
Post by: ZarPrime on May 17, 2010, 01:34:51 AM
Are you talking about the menu at the top of the Forum (like Home, Forum, Help, Search, etc.) or the menu system built into TinyPortal?  If you're talking about the menu at the top, what version of SMF and TP are you using?

ZarPrime
Title: Re: Adding A new page?
Post by: jonesguitarman on May 17, 2010, 01:46:45 AM
Im talking about the menu at the top of the forum(Home, Forum, Help, Search, etc.)

Versions

SMF - 2.0 RC3
TinyPortal - v1.0 beta5.
Title: Re: Adding A new page?
Post by: WillyP on May 17, 2010, 02:01:39 AM
Tutorial on how to hardcode links: http://www.simplemachines.org/community/index.php?topic=261880.0 (http://www.simplemachines.org/community/index.php?topic=261880.0)

I also found a mod that adds links at the top of the page: http://custom.simplemachines.org/mods/index.php?mod=2564 (http://custom.simplemachines.org/mods/index.php?mod=2564)
It would be a cool mod if this mod could integrate with TP's article system to automatically add links to categories/ articles.
Title: Re: Adding A new page?
Post by: ZarPrime on May 17, 2010, 02:06:49 AM
OK, well, adding menu items is much easier with SMF 2.0 RC3 than it was in previous versions though I have to admit that I've never tried to add any.  All the menu items are located near the bottom of the subs.php which is located in the sources folder of your site.  Basically, you have to create a new array for the main button (like "Articles") and then a number of arrays under it for any sub_buttons (like article 1, article 2, etc.).  The 'href' area of the sub button for each article will be something like ...

'href' => $scripturl . '?page=X',


where "X" is the page number.  It's just something you'll have to fool with to get it the way you want it.  If you are going to do this, I would recommend downloading a copy of the subs.php from your site and editing that and when you are ready to try it, rename that file on your site to something like ~subs.php or subs.php.bak and then uploading the edited subs.php.  Of course, you will want to create the articles first in TP.

I'm sure they can probably give you better help over on the SMF site than I could give yu here since I've never done it.

ZarPrime

Edit:  Thanks Willy O0