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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 319
  • Total: 319

"User" block coding

Started by darkspreader, March 24, 2010, 07:57:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkspreader

I was wondering if someone could help me "reverse engineer" the user block available in Tinyportal. What I mean is that I want to build a custom PHP block and make it similar to the default TP User block, so I need the coding to the default block so I can add it in to my custom one. The only reason I am posting this is because I have no knowledge of the PHP language. However, I have been able to successfully reverse engineer parts of both SMF and TP's coding, and make a working custom User block.

Basically, I am interested in the coding for the TP User block. My main concern at this moment is the coding that will show "Awaiting Activation: x" on the default User block whenever there are un-activated members. I am also interested in the code for the total time logged in counter. I have been able to reverse engineer the rest of the links in the block fortunately.

Thanks.

IchBin

The userbox block is in the TPSubs.template.php file. You'll find it by searching for "function TPortal_userbox()"

darkspreader

#2
Where is TPSubs.template.php located? I found TPSubs.php in the Sources folder, but it didn't contain the right info. I also looked in the default theme directory, but could not find it.

Edit: I think I found it in TPBlocks.template.php.

Edit: I got it all working. Thanks!

Xarcell

FYI for future reference:

All files that have .template. in them are located in the Themes directory. Most likely the default.

IchBin

Quote from: darkspreader on March 24, 2010, 08:49:45 PM
Where is TPSubs.template.php located? I found TPSubs.php in the Sources folder, but it didn't contain the right info. I also looked in the default theme directory, but could not find it.

Edit: I think I found it in TPBlocks.template.php.

Edit: I got it all working. Thanks!

Ah... well that code in beta 5 is moved to the file I mentioned. :) Just an FYI for the next version.

ZarPrime

Is there a reason this topic is locked?  OP marked solved. O0

ZarPrime

darkspreader

Oh sorry. I thought locking the topic was TP's form of solved, haha. I'm used to SMF's forum having a dedicated solved topic button.

ZarPrime

Nah, to mark a topic solved we modify the icon on the original post to make it the green checkmark, or you can do it. ;)

ZarPrime

darkspreader

I have to say, TP's support team is a lot more responsive than SMF's. I posted a problem with their phpbb3 to SMF converter, they said that they'll "take a look", but then just ended up saying "we didn't find anything." I had to figure out the problem myself, lol.

IchBin

Yeah, SMF is going through a rough time right now. Hopefully they can pull out of it and get some more people on the team to help out.

This website is proudly hosted on Crocweb Cloud Website Hosting.