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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 141
  • Total: 141

Edit how news are shown + Other questions

Started by neon401, October 03, 2008, 11:22:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neon401

Hello

1. I'd like to edit how the news are shown on my front page, like remove the print icon, put the date under the title instead of in front, hide avatars from showing and some other small tweaks.

2. I also have a problem with a button on my navigation menu. Use login: test1/heihei123 to see it, it's called DKP.
The problem is that when I click the link, it shows the Home button as the active page on the nav menu, hope you understand what I mean.

3. How do I make an image pop up in a pretty frame when clicked like on this website? http://www.flatline-guild.eu/index.php
I'd also like the news to be displayed like they are on that site.

Thanks. Any help is much appreciated!

IchBin

1. Removing the print icon and avatar is an option for the articles. I can't remember where the option is. Look in the article display options or the frontpage options. Moving the date under the title will require you to manually edit the code.

2. If DKP doesn't have an action (in your URL it must use action=DKP or something in order for the button to highlight. Couldn't test it because the account posted says it does not exist. For more information on how to add a button this topic shows you how to add it to the array so that it will highlight. IT will only work if its an action though.
How to add a Home button or a new tab?

3. You'll need to explain more than just "popup". If you're looking for a separate window to popup you can google search javascript popup etc and you should find the code to do this.


neon401

#2
1. I managed to find the option to remove the print icon, but not the option to remove the avatar. Which file do I need to edit to move the date under the title etc?

2. The dkp button is now being highlighted, but it's not linking to article page 2 (of course), where do I define this?

3. I found the SMF mod to open images in a javascript frame, it's called Intergrate Lightbox. I managed to intergrate it into my theme, but for some reason it won't work on the images on the front page (news from forum). I know this might not be the right place to post this, but if you could guide me in the right direction to get it to work with Tinyportal frontpage, that'd be wonderful.

Hej!

IchBin

1. The option to remove the avatar is in each articles display options.
2. You need to post the code so I can see what you're talking about.
3. That is something you'll need to ask the mod author. I have no clue about that mod.

neon401

1. Thing is, I don't want to remove the avatars from articles, but from the news posts on the front page.
2.
if (in_array($context['current_action'], array('search', 'dkp', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum')))
                    // DKP [dkp]
               if ($context['allow_edit_profile'])
                  echo '<li><a' , $current_action=='dkp' ? ' class="current"' : '' , ' href="', $scripturl, '?action=dkp"><span>DKP</span></a></li>';

The "if ($context['allow_edit_profile'])" is there to only show the button to registered users, that's not a problem is it?
I have added

IchBin

Well, you can't have your link point to action=dkp if it doesn't exist. If you're dpk is an article, its not going to hightlight unless you do some code.
Add this towards the top of the funcion with the rest.

if (isset($_GET['page']) && $_GET['page'] == 2)
    $current_action = 'dkp';

Then change your link to point to the page, but leave the current_action settings alone in the code.

Removing the avatar from news posts is something you'll have to find. I would start looking in the TPortal.template.php file for where the news is created.

neon401

#6
Thank you so much. I got the DKP issue working now. :)

EDIT: Regarding the editing of how board news are shown... I've looked around in TPortal.template.php, tried some changes, but I either get a template error or nothing changes. I really don't know what I'm doing. I've seen many people do it. If you could guide me a bit more in the right direction it would be of immense help :)


IchBin

If you'd like to wait for the next release, the fix will be there for this. Can't say when that will be though.

This website is proudly hosted on Crocweb Cloud Website Hosting.