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: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 467
  • Total: 468
  • @rjen

[Block] Board Index Menu

Started by IchBin, August 23, 2007, 02:31:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

Yep, I commented where you can edit certain text. Just add your icon code to the echo code for it. Although, it will have to be the same icon for all as there is no way to assign different icons to each board atm.

falguni1


IchBin

This is the code that makes the board. Notice the comments I put so people would know where to edit.
            if (!$board['child_level']){
//edit the following line for the regular board text
echo '<a href="',$scripturl,'?board=', $board['id'], '">', $board['name'], '</a><br />';
//this line you can edit for the topics count text
echo '<span class="smalltext" style="margin-left: 10px;">', $board['topics'],' ', $txt[330], '</span><br />';


Add your icon to the regular board line like this: (may require some tweaking to make it look good as I haven't tested this).
            if (!$board['child_level']){
//edit the following line for the regular board text
echo '<img src="http://www.tinyportal.net/tp-images/Image/tinyportals.gif" /><a href="',$scripturl,'?board=', $board['id'], '">', $board['name'], '</a><br />';
//this line you can edit for the topics count text
echo '<span class="smalltext" style="margin-left: 10px;">', $board['topics'],' ', $txt[330], '</span><br />';

alving

i want to put this just below my webpage in a frontpage block..  currently, all the links show up vertically, can someone tell me how to put the links (categories, boards, topics) horizontally, like in a table form..  this is to emulate those blogs with category links underneath their webpage

example

category 1     category 3     category
  board 1          board 3          board
    2 topics          2 topics         topics
                      board 4
category 2   
  board 2
    2 topics

etc..

thanks in advance!

alving


3nd3r

Well, I'd like to ask for a little addition to this wonderful code: RSS.

The thing I'd like to show is a RSS feed icon (like this, for example ) before each category and board, that links to their RSS.

Just like this SMF mod does (RSS Feed Icon for boards): http://custom.simplemachines.org/mods/index.php?mod=376

I think this could be very useful for all who want syndicate contents

IchBin

Change the following line:
echo '<a href="',$scripturl,'?board=', $board['id'], '">', $board['name'], '</a><br />';

To this:
echo '<a href="',$scripturl,'?board=', $board['id'], '">', $board['name'], '</a><a href="',$scripturl,'?action=.xml;board=', $board['id'], ';type=rss"><img src="',$settings['images_url'],'/rss.gif" /></a><br />';

You will then need to add your image of choice for the rss.gif to your themes images folder.

3nd3r

#37
Thank you very much! Works perfect!

Actually, I've used http://www.smashupgraphics.com/smashups/rss-feed-button to generate the rss gif image, and made some changes to show the block the way I like:
//edit the following line for the regular board text
echo '<a href="',$scripturl,'?action=.xml;board=', $board['id'], ';type=rss"><img src="',$settings['images_url'],'/rss.gif" alt="RSS de ', $board['name'],'"" /></a> <a href="',$scripturl,'?board=', $board['id'], '">', $board['name'], '</a>:  ';


I want to show also RSS for categories and syndicate only posts and not the comments, but I think I can get it by myself. Any help in this direction would be very appreciated, though.

Thank you again for your help!  :up:

sanax

..great snippet

Is there a way to alter the code so that only certain Categories and Boards show up? I was thinking of hiding one or two Categories/Boards...

IchBin

Not really. What it does is only shows the categories and boards if the user is allowed.

This website is proudly hosted on Crocweb Cloud Website Hosting.