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

Recent

Welcome to TinyPortal. Please login or sign up.

May 05, 2024, 12:59:20 PM

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

One Center block on multiple forums.

Started by 7earitup, October 13, 2007, 12:07:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

7earitup

How can I get one block to show on multiple specific forums? I would rather not have to make a center block for each of the forums.

If anyone knows how or can point me to a hack, it would be appreciated.

Zetan

This feature is to be added in TP 1.0
For now, there is a hack posted by IchBin. I don't know where exactly it is, so you'll need to search.

7earitup

I am not having much luck looking for it. Any idea what to search for?

IchBin

Don't forget when you search you can choose a users posts that you want to search. I don't know where its at either so I would have to search for it as well. But I'll leave that up to you.

7earitup

I found the post:
http://www.tinyportal.net/index.php?topic=14385.10

But I do not know how to combine the two snippets of code you had posted. I am completely new to PHP so I have no clue what breaks it and how to fix it when it does break.

tick

post your code here you want to use this with and I will try to help

7earitup

Quote from: Tick� on October 14, 2007, 12:17:33 AM
post your code here you want to use this with and I will try to help

I basically just want to have a centered image in certain forums and child forums.

tick

ok post the code for the image and I will have a go at it.  I am not a coder by any means but I will see what I can do with it

7earitup

Just something simple like this:

<div style="text-align: center;"><img width="134" height="100" src="/forums/tp-images/Image/bleach1.jpg" alt="" /></div>

Thanks a bunch buddy  ;D

tick

global $context;
if($context['current_action'] == '')
$current_action = 'home';
//$current_action = 'forum';
if (isset($_GET['board']) || isset($_GET['topic']))
$current_action = 'forum';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
$current_action = 'forum';
if($current_action == 'forum')
{
echo '<div style="text-align: center;"><img width="134" height="100" src="/forums/tp-images/Image/bleach1.jpg" alt="" /></div>';
}
else
{
return;
}
  Try this