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: 423
  • Total: 423

[Block] Multi Tab Block! (new)

Started by dimdom, January 12, 2009, 07:13:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dimdom


This is a multi block based mainly on the work of other members of Tiny Portal community. I havent logged the data for each block I have used, so I would like to give credits to all the members that wrote these codes. The base code for this block was created  by StormLrd (Mini-User CP).

All I did was to combine these blocks in a tabbed browsing main block that can be used as a front page (or center) block. Tables were added to render the code for  horizontal use.

It includes tabs for New Topics, TP Tools, New Articles, New Files, Statistics, Member info, Search and Shoutbox


In action: http://www.authorway.com/SMF

Instructions:

1. Download the zip file. Choose between Greek and English version.

2. Place infopanel2.php to the Sources directory.

3. Create a php block with the following code:

// Declare the globals to call the main file
global $sourcedir;

// And Call the file
require_once($sourcedir . '/infopanel2.php');


4. Use it as a front page or center block.

5. Upload the two images in your theme/images directory (in your active theme) and nav.gif to your theme/images/topic directory


The block is made to fit in dark themes, but it is very easy to modify it for lighter themes too.

Some extra info:

This block was made for use with 0.9.8 Tiny Portal.

You have the option to set the article categories that you want to show on New Articles.

You must have the shoutbox module enabled somewhere in your forum in order to work correctly in this block.

The infopanel2.php file, is coded in utf-8 in order to display correctly in any language.

Sorry for Greek, but I was lazy last night and thought that it was going to be very easy for someone to find and translate the Greek words in any other language. :)

If you test it and find any errors, please report them here.

Thank you for your time.


G6Cad

Thank you for sharing.
I will move it to the block code and snippets board as it is better suited in there :)

dimdom

#2
OK, suits better here. :)

fords8

Block went in fine, but the only tabs coming out in english are tools and shout.

The two places in the file you download that need to be changed to english are: (At least this is all I seen anyways.)

echo '
<li><a href="#" rel="tcontent4">Νέα Άρθρα</a></li>
<li><a href="#" rel="tcontent2">ΣÏ,,αÏ,,ισÏ,,ικά</a></li>
<li><a href="#" rel="tcontent8">ΣÏ,,οιχεία μέλοÏ...Ï,</a></li>
<li><a href="#" rel="tcontent5">Î'ναζήÏ,,ηση</a></li>
<li><a href="#" rel="tcontent7">Shoutbox</a></li>
</ul>


and

[ // Not "array"? Throw the default output out.
$counter = 0;
echo '<table width="100%" border="0" cellspacing="1" cellpadding="4" id="RecentArticlesTBL" class="bordercolor">
<tr align="center" valign="middle" class="catbg3">
<td colspan="2"><span class="normaltext">ΠρόσφαÏ,,α Ἄρθρα</span></td>';
// Show author column?
if($show_author)echo'
<td><span class="normaltext">ΣÏ...γγραφεύÏ,</span></td>';
// Show category column?
if($show_category)echo'
<td><span class="normaltext">ΚαÏ,,ηγορία</span></td>';
// Show the time its posted on column
if($show_time)echo'
<td><span class="normaltext">Î"ημοσιεύÏ,,ηκε</span></td>';
// Show ratings column?
if($show_rating)echo'
<td><span class="normaltext">Î'αθμολογία</span></td>';
// Show views column?
if($show_views)echo'
<td><span class="normaltext">ΕμφανίσειÏ,</span></td>';
// Show comments column?
if($show_comments)echo'
<td><span class="normaltext">Σχόλια</span></td>';
echo'</tr>';
foreach ($items as $i)


There maybe more that needs to be change.

G6Cad

Good point, the code should be all English when posted for everyone  :D

fords8

I also don't have the shoutbox on my site.

I get a:
QuoteAn Error Has Occurred!
Unable to load the 'main' template.

When I type in the shout box and hit the shout button.

G6Cad

This board is not for support, you have to write your question in the support board, and after you have read this-
Please read the Posting Guidelines.html

fords8

Quote from: G6 on January 13, 2009, 07:26:55 AM
This board is not for support, you have to write your question in the support board, and after you have read this-
Please read the Posting Guidelines.html

Was not asking for support. Was doing what he/she asked. And that was reporting a error. And I see that he/she edited the first post now to include the two things I found.

cepsi

Fanatstic Job ive been looking for something like this for a while. works great on my site with  TP v1.0.5

Renegd98

One thing I noticed is that this code snippet has alot of StormLrd's code in it.  It has alot of his Mini-User CP code in it.  I am sure he would appreciate it if you put somewhere that he has provided code for this snippet.

He is out of the net currently so I am not sure what his thoughts would be...

This website is proudly hosted on Crocweb Cloud Website Hosting.