TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 03:33:32 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 190
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 131
  • Total: 131

Finding // display user name

Started by PorcelainPrincess, November 26, 2006, 04:36:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PorcelainPrincess

Ok I didn't use the package manager to install the TP. I had too many mods and it was causing some conflict, gave me a fail in tests. I do have my own theme. I am running SMF RC3. I can't seem to find the // display user name to put the code before. That is the ONLY problem I have, I left the code out and it runs perfect except that the left block is missing now.

I have a menu on the left right now, I would like to do away with most of it using the TP. I am attaching my index.template file, if anyone can help, I would appericate it very much. Thanks!


Techdomain

I dont know that that bit would stop your left bars from showing - I have had a look through a few of my themes, and none of them include that. Maybe you missed something else, or the left menu's you currently have are causing problems?

PorcelainPrincess

Let me look it all over again, maybe I did miss something. Does anyone know where I would put that code

<search for>
// display user name
</search for>
<add before>
// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
// TinyPortal end
</add before>


Which that would stop the top from working. I am going to try to remove the menu on the side to see what I can get to work. But I tried added the above code in a few different places and always get a template error. If someone needs that error, I can do it again and copy and paste it here.

akulion

For manual mod instructions please refer to these docs
http://www.tinyportal.net/smf/index.php?board=131.0

they give details in full - just pick the versions ur working with and ull be set

PorcelainPrincess

Yeah I did that, I can't find the // display user name part.

akulion

oh sorry i thought u were using the mod file for instructions following the XML file

I think ull have to wait for one of the theme guys to get this one - I tried but no luck

PorcelainPrincess

It's ok, I am messing around a bit, grabbed the default index file and I am messing around with it a bit, things are working out now. Not quite how I had it laid out before, but it's ok ;)

bloc

The instruction to find "// display user.." is meant for default theme, so in other custom themes you have to approximate where it should be.

Basically...the setting "showtop" should decide if a portion of theme is hidden or not, typically the user section. So you simply find that portion and enclose it in the "if ($context['TPortal']['showtop]){" befoe - and a "}" after it. of course putting echo statements where needed. Why do you need to hide it..? Well, TP articles have an option to "show top" or not, to fully use the page for itself, thats why you need to add that code into the theme so it will respond to the setting in articles. If not, the article will just show the "top"/user section" regardless.

That goes for the panels too..just find in the code where you want the left panel and use the mod code to insert it. In default theme its just adding a extra left <td> to a table, and inside that a "if" statement do the actual call for fetching the panel.

Techdomain

* JRW wonders if bloc knows the SMF/TP and themes code off the top of his head... :P

bloc

well..at least themes and TP code have stuck now. :)


PorcelainPrincess

Thanks Bloc, I found it last night right before I went to bed and got it all added where I wanted it. ;) Now I know who to run to when I need help.