TinyPortal

Development => Support => Topic started by: mmholt on November 22, 2010, 04:02:11 AM

Title: modifying SMF/TP.98 theme
Post by: mmholt on November 22, 2010, 04:02:11 AM
Does anyone have any tips on modifying a theme designed for TP .98 to make it work will with the current version? We really like this theme and haven't found another anywhere that suits us. It's pretty simple to remove the TP stuff from the theme's css file, but I'm not sure what do to with the PHP files. In my attempts, I mangled it pretty bad. Any advice would be appreciated.
Title: Re: modifying SMF/TP.98 theme
Post by: agridoc on November 22, 2010, 05:52:06 AM
There is still in the Web an archive of Crip's TP_SMF Theme Conversion Guide fot TP 0.9.x
http://web.archive.org/web/20070704194247/http://www.cripcan.com/cripconvert.htm

You can use to see and reverse the changes. Some edit will be necessary.
Title: Re: modifying SMF/TP.98 theme
Post by: mmholt on November 22, 2010, 02:57:22 PM
Quote from: agridoc on November 22, 2010, 05:52:06 AM
There is still in the Web an archive of Crip's TP_SMF Theme Conversion Guide fot TP 0.9.x
http://web.archive.org/web/20070704194247/http://www.cripcan.com/cripconvert.htm

You can use to see and reverse the changes. Some edit will be necessary.

Awesome. That is just the sort of information I was looking for. Thank you so very, very much!
Title: Re: modifying SMF/TP.98 theme
Post by: mmholt on November 29, 2010, 04:06:32 AM
Crip's TP_SMF Theme Conversion Guide was a great help, but I still have one problem. If I follow the instructions to remove the code that the old TP used to show the Forum button, I lose my forum button. Any idea what I might need to do?

Also, a problem has cropped up since I upgraded to the most recent Tiny Portal (though it is probably my theme's fault). When viewing a forum post, there is a line that says "TP Frontpage" and I can't figure out how to get rid of it. Here's what it looks like: http://awesomescreenshot.com/0a540x247

One more thing I just noticed - there is a "Topic Tools" button on each topic, but it doesn't do anything. I'd like to get rid of it or make it  work, whichever one doesn't matter to me.

Any suggestions on where to look to fix these things? site is http://nwoclan.net
Title: Re: modifying SMF/TP.98 theme
Post by: mmholt on November 29, 2010, 04:16:49 AM
Disregard the part about the forum button. I figured out what was needed.
Title: Re: modifying SMF/TP.98 theme
Post by: ZarPrime on November 29, 2010, 09:44:21 AM
Quote from: mmholt on November 29, 2010, 04:06:32 AM
Also, a problem has cropped up since I upgraded to the most recent Tiny Portal (though it is probably my theme's fault). When viewing a forum post, there is a line that says "TP Frontpage" and I can't figure out how to get rid of it. Here's what it looks like: http://awesomescreenshot.com/0a540x247

I don't see that as a guest.  It looks like a block header.  Do you have any blocks that have that title?  The other thing that could be is the "Promote to FrontPage" link, a feature of this version of TinyPortal.  That feature allows a member with the proper permissions, like an Admin, to publish a particular topic to the Frontpage of the site and then, if you have either "Selected topics only" or "Selected topics + articles" chosen for "What to display on frontpage:" in the FrontPage Settings, the Admin can publish that topic to the FP.  See the image I attached below to see what it looks like on this site.

Quote from: mmholt on November 29, 2010, 04:06:32 AM
One more thing I just noticed - there is a "Topic Tools" button on each topic, but it doesn't do anything. I'd like to get rid of it or make it  work, whichever one doesn't matter to me.

That "Topic Tools" thing is probably just the way the theme author designed the theme.  It probably contains links in the dropdown for stuff like "Add Poll or Remove Poll", "Mark Unread", "Notify or Unnotify", "Send Topic", "Print:, etc. (also shown in attached image below).  Again, probably put into the theme by the author to cut down on having to show those buttons but a dropdown instead.

ZarPrime
Title: Re: modifying SMF/TP.98 theme
Post by: mmholt on November 29, 2010, 04:43:13 PM
Thanks, ZarPrime. After you said you could not see that block header as guest, I checked with a test account, and I can't see it there either. It looks like it is only displayed for admins. I don't have any blocks with the title "TP Frontpage". I've searched all my files and my database and can't find the string "TP Frontpage" anywhere. I switched to the default SMF theme temporarily, and the "Promote to Frontpage" button was displayed just above that block header. But the setting I have for my one Frontpage article block is "Article only". Where in the code can I comment out this functionality? I won't ever use it, and I really want to get rid of that block header.

I found the "Topic Tools" code and was able to get rid of it. There was code to display the button, but not to make it do anything, so it was pretty useless.

Thanks again for all your help.
Title: Re: modifying SMF/TP.98 theme
Post by: IchBin on November 29, 2010, 05:23:40 PM
In Sources/TPortal.php you can comment out this section of code to remove that layer.


    // choosing topics for frontpage
    if(!empty($_GET['topic']) && empty($_GET['action']))
    {
        if(allowedTo(array('tp_settings')))
            $context['template_layers'][] = 'tpfrontpagetopics';
    }
Title: Re: modifying SMF/TP.98 theme
Post by: mmholt on November 29, 2010, 05:35:08 PM
Thank you, thank you, thank you! You guys are the best!!!
Title: Re: modifying SMF/TP.98 theme
Post by: ZarPrime on November 30, 2010, 12:14:03 AM
Good.  We'll go ahead and mark this topic solved. O0

ZarPrime