TinyPortal

Development => Block Codes => Topic started by: dimdom on January 12, 2009, 07:13:23 PM

Title: [Block] Multi Tab Block! (new)
Post by: dimdom on January 12, 2009, 07:13:23 PM
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg210.imageshack.us%2Fimg210%2F558%2Fmultitabblockjb4.jpg&hash=3052359c70dc5be169e43461dc22e21e85bcbac9)

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.

Title: Re: Multi Tab Block! (new)
Post by: G6Cad on January 12, 2009, 07:22:59 PM
Thank you for sharing.
I will move it to the block code and snippets board as it is better suited in there :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on January 12, 2009, 07:27:43 PM
OK, suits better here. :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: fords8 on January 13, 2009, 06:22:16 AM
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.
Title: Re: [Block] Multi Tab Block! (new)
Post by: G6Cad on January 13, 2009, 06:23:18 AM
Good point, the code should be all English when posted for everyone  :D
Title: Re: [Block] Multi Tab Block! (new)
Post by: fords8 on January 13, 2009, 06:32:33 AM
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.
Title: Re: [Block] Multi Tab Block! (new)
Post by: G6Cad 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 (http://www.tinyportal.net/index.php/topic,581)
Title: Re: [Block] Multi Tab Block! (new)
Post by: fords8 on January 13, 2009, 02:54:25 PM
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 (http://www.tinyportal.net/index.php/topic,581)

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.
Title: Re: [Block] Multi Tab Block! (new)
Post by: cepsi on January 13, 2009, 03:37:01 PM
Fanatstic Job ive been looking for something like this for a while. works great on my site with  TP v1.0.5
Title: Re: [Block] Multi Tab Block! (new)
Post by: Renegd98 on January 13, 2009, 07:45:30 PM
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...
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on January 13, 2009, 07:51:06 PM
Quote from: Renegd98 on January 13, 2009, 07:45:30 PM
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...

I have already point that out at my first post. In the next version of it, I will add these members in the infopanel2.php. For now, I added this information at my first post.


QuoteThis 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.

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.
Title: Re: [Block] Multi Tab Block! (new)
Post by: NOBLE CANADIAN on January 13, 2009, 07:53:46 PM
Quote from: dimdom on January 12, 2009, 07:13:23 PM
This block was made for use with 0.9.8 Tiny Portal.

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

Hello, I'm testing this block with TinyPortal v1.0.5 beta 1 and the shoutbox doesn't seem to work. The window and 'Shout' button appear; however, the window is completely empty and any new shouts don't register. There is also a problem within the statistics area; which only displays the member and overall statistics.

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi261.photobucket.com%2Falbums%2Fii41%2FEXILE003%2FMisc%2Fshoutboxerror.jpg&hash=781e23fa14659a429602445cbbcfaf42986273cd)

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi261.photobucket.com%2Falbums%2Fii41%2FEXILE003%2FMisc%2Fstaterror.jpg&hash=c1a26b702a282c3ee513e0aebbe37fd27a52325a)

TinyPortal v1.0.5 is a beta release and it's certainly understandable if bits and pieces don't mesh together when using this block. I just thought I would share the results that took place on my site in hopes that a remedy might become available.

Quote from: cepsi on January 13, 2009, 03:37:01 PM
works great on my site with  TP v1.0.5

Does your shoutbox and statistics area appear similar to what's displayed on dimdom's site (http://www.authorway.com/SMF).
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on January 13, 2009, 07:59:56 PM
QuoteHello, I'm testing this block with TinyPortal v1.0.5 beta 1 and the shoutbox doesn't seem to work.

As said before, you have to have the shoutbox active somewhere else in your forum (ie left panel or right panel) for the multitab shoutbox to work.

QuoteThere is also a problem within the statistics area; which only displays the member and overall statistics.

It is supposed to show only these.
Title: Re: [Block] Multi Tab Block! (new)
Post by: cepsi on January 13, 2009, 08:04:13 PM
i took the shoutbox off on mine as i dont use it. No problem with the stats tho ( ihave use the advanced stats snippet). itll be worth getting an English version up here. I've made a few changes to mine, so would be different to the original now. (if i put this on another of my sites tho i will copy the php file if it isnt done b4 (with greek replaced with English)
Title: Re: [Block] Multi Tab Block! (new)
Post by: ZarPrime on January 13, 2009, 08:07:16 PM
Exile,

If this uses the same code that StormLrd's code uses, as Renegd98 has said, it's entirely possible that running another instance of something, like the shoutbox, might interfere with this block.  If you have another instance of shoutbox in another block, keep the shoutbox module on but turn off the other shoutbox, clear your cache, and try again to see if it works better.  I don't know about the statistics problem.  I haven't even looked at this code, but maybe I'll try it on one of my sites later and see what happens.

ZarPrime
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on January 13, 2009, 08:27:44 PM
OK.

Credits added.
English version added.
New Files (downloads) tab added.
Newer attachements on first post. :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: cepsi on January 13, 2009, 08:52:41 PM
your the man dim!
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on January 13, 2009, 08:57:23 PM
Quote from: cepsi on January 13, 2009, 08:52:41 PM
your the man dim!

Thanks.

Dont forget to download the nav.gif and upload it to images/topic directory (see first post).
Title: Re: [Block] Multi Tab Block! (new)
Post by: G6Cad on January 13, 2009, 09:34:15 PM
Quote from: dimdom on January 13, 2009, 08:27:44 PM
OK.

Credits added.
English version added.
New Files (downloads) tab added.
Newer attachements on first post. :)

Great :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: UkGangsta on February 24, 2009, 10:52:08 PM
how do i remove the shout box tab as i use a different shout box , rest of code is fine but i dont need shout box part ? or remove shout box out of this code all togther.
Title: Re: [Block] Multi Tab Block! (new)
Post by: UkGangsta on February 24, 2009, 11:49:24 PM
done it thxs  ;)
Title: Re: [Block] Multi Tab Block! (new)
Post by: UkGangsta on February 25, 2009, 12:05:57 AM
okay i took out this part of the code to take of the shoutbox tab "
<li><a href="#" rel="tcontent7">Shoutbox</a></li>

and i have now this tiny little bit of script on forum boards can any one suggest what i have done wrong or have a suggestion to fix this what i want in essence is the shout box tab completely removed.

look at attached img.
Title: Re: [Block] Multi Tab Block! (new)
Post by: ZarPrime on February 25, 2009, 02:52:36 AM
UKG,

Not sure because I haven't tried it but my guess is that you have to remove the div for tcontent7 as well.  Make a backup first.  Probably remove this code ...
<div id="tcontent7" class="tabcontentstyle tabcontent">';


        global $context, $settings, $options, $scripturl, $txt, $modSettings;

        // Show the shoutbox, takes settings from tpadmin
       if(isset($context['TPortal']['querystring']))
             $tp_where=$context['TPortal']['querystring'];
       else
              $tp_where='';

       if(!isset($context['TPortal']['shoutbox']))
             $context['TPortal']['shoutbox']='';

if($context['TPortal']['shoutbox_usescroll']=='1')
echo '
<div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">
<div id="vmarquee" class="smalltext" style="text-align: left;position: absolute; width: 98%;">
'.$context['TPortal']['shoutbox'].'
</div>
</div>';
else
echo '
<table cellpadding="0" align="center" width="100%" cellspacing="0" style="table-layout: fixed;">
<tr><td><div class="smalltext" style="width: 99%; height: '.$context['TPortal']['shoutbox_height'].'px; overflow: auto;">', $context['TPortal']['shoutbox'], '</div></td>
</tr>
</table>';

       // show archives
       if($context['TPortal']['show_shoutbox_archive']>0){
echo '
<div style="text-align: center; margin-top: 5px; " class="smalltext"><a href="',$scripturl,'?action=tpmod;sa=shoutbox;shouts='.$context['TPortal']['show_shoutbox_archive'].'">',$txt['tp-showshouts'],' ',$context['TPortal']['show_shoutbox_archive'],'</a></div>';
       }
       echo '
       <form  accept-charset="', $context['character_set'], '" class="smalltext" style="padding: 0; margin: 0; margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod;id=shout" method="post">';
       if(($context['TPortal']['guest_shout']) || (!$context['TPortal']['guest_shout'] && !$context['user']['is_guest'])){
             echo '<textarea class="smalltext" name="tp-shout" style="width: 80%;margin-top: 1ex; height: 18px;" wrap="auto"></textarea><br />';
          echo '<input style="margin-top: 4px;" class="smalltext" type="submit" name="shout_send" value="'.$txt['shout!'].'">';
}
       if($context['user']['is_guest'] && $context['TPortal']['guest_shout'])
             echo '<br /><input style="margin-top: 4px;" size="20" class="smalltext" type="text" name="tp-shout-name" value="'.$txt['tp-guest'].'">';
       else
             echo '<input type="hidden" name="tp-shout-name" value="'.$context['user']['name'].'">
             ';

       echo '<input name="tp-shout-url" type="hidden" value="'.htmlspecialchars($tp_where).'"><input type="hidden" name="sc" value="', $context['session_id'], '" />
       </form>';
       
       

echo '</div>


ZarPrime
Title: Re: [Block] Multi Tab Block! (new)
Post by: UkGangsta on February 25, 2009, 09:42:48 AM
tried what u said still hasnt fixed the problem.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on February 25, 2009, 11:55:11 AM
Without Shoutbox.

Use the attached infopanel2.php
Title: Re: [Block] Multi Tab Block! (new)
Post by: UkGangsta on February 25, 2009, 02:19:11 PM
thxs dimdom that works perfect i really like this thats why i wanted it look right great job and thankyou very much.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on February 25, 2009, 02:30:09 PM
You're welcome. :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: T-Cat on March 06, 2009, 05:12:25 PM
This is really nice :)

However, my articles are not showing. Everything else looks great.
QuoteYou have the option to set the article categories that you want to show on New Articles.
How are these options set? Maybe this is why mine are not showing?

I also noticed on your site, that you have gallery pics included in the block. I would like this too. I think this will help my users so much!

If there is support for this else where, I couldn't find it.
Not sure if this is an error, or just a user error  ???
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on March 07, 2009, 10:28:07 AM
QuoteHowever, my articles are not showing. Everything else looks great.

Find this part of code in infopanel2.php:

articles(
$mode = 1,
$limit = 5,
$cats = array(60,1,50,167),
$show_comments = true,
$show_views = true,
$show_rating = true,
$show_time = false,
$show_category = true,
$show_author = false,
$show_articleComment = true,
$output_method = 'echo'


and change in this line:

$cats = array(60,1,50,167),

the article categories that you want to show.
Title: Re: [Block] Multi Tab Block! (new)
Post by: T-Cat on March 07, 2009, 02:08:02 PM
Ah! Thank you so much :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 01, 2009, 07:23:47 PM
OK, guys, I need serious help with this one...

I am trying to change the container code for the php blocks inside infopanel2.php , in order to show the same info but inside this container (http://www.dynamicdrive.com/dynamicindex1/mouseovertabs.htm)...


I havent a clue how to add php code in an html script...

Can someone give me an example with this infopanel2.php file?

I will really appreciate any help...

Title: Re: [Block] Multi Tab Block! (new)
Post by: JPDeni on September 01, 2009, 08:31:27 PM
QuoteI havent a clue how to add php code in an html script...

You can't. You have to start with a php block and put your html into it.

You should be able to just use that file, except that you need to remove the


<?php


from the beginning and the


?>


from the end.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 01, 2009, 08:54:34 PM
JPDeni, I guess that you havent even check the file that i have attached or the link for the container...

In the attached file you will see what do I mean (there is already a script that holds php code).

What I am asking, can be done.

I just can find the right syntax since I dont know php.
Title: Re: [Block] Multi Tab Block! (new)
Post by: JPDeni on September 01, 2009, 09:57:29 PM
QuoteI guess that you havent even check the file that i have attached or the link for the container...

As a matter of fact, I looked at them both.

QuoteIn the attached file you will see what do I mean (there is already a script that holds php code).

No. There is php that holds javascript. Here's a clue. The file is called "infopanel2.php". That means that it is a php file.

QuoteWhat I am asking, can be done.

Can what be done? Adding php to html code? No. It can't be done. What can be done is to add html to php code, which is what the file contains that you attached to your post.

QuoteI just can find the right syntax since I dont know php.

The right syntax for what? You haven't said what it is that you want to do. What code are you wanting to add and what code are you wanting to add it to? If you're wanting to add the Dynamic Drive code to the php code that you attached, then, just as in the file you attached, put it into an "echo" statement:


echo 'put html here';


You can see the pattern for how to do it in the file you attached. Have you looked at that file?
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 02, 2009, 09:20:59 AM
Ok, I think that i might have used the wrong words...

I would like to add this script (http://www.dynamicdrive.com/dynamicindex1/mouseovertabs.htm) to infopanel2.php file, so it will have the tab look that this script provides and not the one that is showing now in my site (http://www.authorway.com/SMF/index.php) (which can be seen as a front page center block, below the rotating images block)

Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 02, 2009, 09:34:44 AM
QuoteYou can see the pattern for how to do it in the file you attached. Have you looked at that file?

Very well, since I am the one that mixed all these excellent (and not mine) codes together.  :)

But I can not find the right way to change it to this new look...
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 01:02:16 PM
The menu system you link to is simply that - it's just a menu system - it does not provide tabbed content.

Is it just the 'look' of the menu buttons that you are wanting to change ?
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 02, 2009, 01:34:32 PM
QuoteThe menu system you link to is simply that - it's just a menu system - it does not provide tabbed content.


Yes, but you can make the php blocks showing inside the content tabs.



QuoteIs it just the 'look' of the menu buttons that you are wanting to change ?


Take a look at this page: http://www.dpgr.gr/  At the top right. I de like to give you an idea of what i am after but as a center block in frontpage...
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 01:42:04 PM
OK, so you don't want the sub-menu then ?

That example helps but it looks very like what you already have, so I am assuming you just want to copy the way the tabs look when they are selected ?

BTW, this is just to clarify what you want.  At the moment, I will not be able to do anything as JPDeni may already be working on this...

Edit : so I assume you want the tabbed content to show when you hover over the tabs too ?  Rather than clicking on the tab to show the content ?
Title: Re: [Block] Multi Tab Block! (new)
Post by: JPDeni on September 02, 2009, 02:10:53 PM
QuoteJPDeni may already be working on this...

Go with it, freddy. You have a better handle on what he wants than I do.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Zetan on September 02, 2009, 02:27:12 PM
deleted my post as it wasn't really relevant.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 02:31:36 PM
@JP, Ok then I will see what I can do...

Thanks anyway Zetan...but yes I think that was what we already had..

I see a problem with the code at Dynamic Drive :

That menu system will not work with dynamic php rendered content.  That is because it relies on static HTML to build the submenu contents.  I quote :

QuoteA corresponding sub menu container DIV:

<div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="submenucontents.htm" style="visibility:hidden">Sub Menu contents[/url]

</div>

So I know what you are getting at, but with the way that code works it is not possible.
Title: Re: [Block] Multi Tab Block! (new)
Post by: JPDeni on September 02, 2009, 02:38:31 PM
If you print out the html through php, you can make it work. Something like


$link = 'submenucontents.htm';

echo '
<div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="' . $link . '" style="visibility:hidden">Sub Menu contents

</div>';



You can define the variable any way you want, including by a $_REQUEST variable or a call to the database.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 03:05:05 PM
Yeah I see what you mean.  Things is; however you do a link to that .htm file it is still going to be static HTML (contained within it) , so I can't see how instead of the links you would show a tab full of content... hope that makes sense..

submenucontents.htm only holds HTML because the code is looking for static HTML to crawl and then from that it generates the submenu.

Edit : Hmmm...you have given me an idea.  It might be possible to make submenucontents.htm into a PHP file and link to that, it just depends on what the javascript is looking for.  This would mean that you would have to have a seperate PHP file sitting on your server which grabs all the content...and the menu system just crawls the resulting (echoed) HTML instead.

Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 03:42:19 PM
Well it seems a bit wayward but it does actually work.  I noticed a slight delay when loading - but they thought to provide a 'loading' message.  So who knows maybe this could work after all.  It's going to mean figuring out what needs to be included in the 'external' PHP file to make all that dynamic content available.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 02, 2009, 05:28:01 PM
QuoteEdit : so I assume you want the tabbed content to show when you hover over the tabs too ?  Rather than clicking on the tab to show the content ?

Thanx freddy888 for your time in this.  :)

Well, I believe that it would be better not to use the hover effect.



Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 05:33:59 PM
Good timing dimdom...

I am working on this at the moment and I am pleased with the results so far.  I've actually left the hover over effect in, because it's quite cool and it saves clicking lol

But yes, it will mean using some new files dropped in the forum root and also an external PHP file which I need to figure out - that means I need to work out what it needs to include (ie grab from SMF)...

Leave it with me, I am going to set up a demo forum for this (needed to do this before really) and I will probably post this in a new thread as it's such a departure from the code that this thread was originally covering.

Time for my tea though, so back later.  :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: JPDeni on September 02, 2009, 05:36:27 PM
QuoteWell it seems a bit wayward but it does actually work.  I noticed a slight delay when loading - but they thought to provide a 'loading' message.  So who knows maybe this could work after all.  It's going to mean figuring out what needs to be included in the 'external' PHP file to make all that dynamic content available.

I get it now. I think. :)

Good for you getting this going. I don't deal with javascript very often and for some reason I haven't been able to picture this at all.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 06:15:34 PM
:)  Well everything I know about javascript could be written on a matchbox.  As long as I don't have to tinker with it too much I'm usually OK.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 02, 2009, 06:59:18 PM
freddy888, take your time. ;)

Let us know if something is ready to be tested.


QuoteI've actually left the hover over effect in

It is easy to change the behaviour from inside the .js file

And all you have to do is to target the script (within the php file) to .css and .js files (the .css code could actually be copied inside the infopanel2.php in order to minimize the installation steps).

Just an idea.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 07:09:10 PM
Great minds think alike - I had already put the css in the new PHP file as it was so short.  The javascript I decided to link to a separate file because it just confuses things with it in the PHP script...

infopanel2.php like I said is actually going to be a new file, but with basically the same functions - so I will just strip out what we need from there.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 02, 2009, 09:56:20 PM
Just an update.  I've started to strip out the functions from that original PHP file and am working through each one.  I hit a problem as this code was written for TP 0.9.8 so things like text strings are not appearing for me in the new beta.  It's going ok though but I will leave this for today.

Tomorrow I will set up a 0.9.8 test site and carry on with it from there.  Hopefully I can produce one version that will work with various versions of TP.

Later..
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 02, 2009, 10:44:24 PM
If you need help testing it, just let me know.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 03, 2009, 01:58:59 PM
Yes please, but not just yet.  I'm having to rewrite/rearrange a lot of it, so I'm just going through your PHP file one stage at a time and pulling things I need out of it to make the new file.  I'll probably be able to get it running so you can see it later today.
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 03, 2009, 03:36:50 PM
Hmm, well I tried to set up a 0.9.8 version of TP to test this out and your original infopanel2 php code doesn't work at all LOL  Even though the exact same code works in TP 1.0...

So I don't know what to do for the best.  I could rewrite the whole thing is stages I guess.  Or just supply the skeleton of the system and let you work on the actual content yourself.

I'll mess around some more for now..

Edit ...got it working in 0.9.8 now... for some reason it didn't get saved correctly.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 03, 2009, 07:48:42 PM
QuoteHmm, well I tried to set up a 0.9.8 version of TP to test this out and your original infopanel2 php code doesn't work at all LOL

:o :o :o

QuoteEdit ...got it working in 0.9.8 now... for some reason it didn't get saved correctly.

::) ::) ::)

OK, I know that my file is a php chaos, but somehow it is working perfect. Good to hear that you got it working.

I also know that the task you are up to is a difficult one.

So we will be patient.  :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 04, 2009, 01:12:31 PM
Thanks dimdom, I appreciate the patience :)

I was hoping to get this done yesterday, but as always Real Life got in the way.

It's basically working now, I just have to tidy up some things in the code and have a couple more functions to strip out.

But yes I found strange things were still happening with that original code - when I pasted it into a PHP article and saved it when I go back it seems to overflow the text area - see image.  And it doesn't work fully.

But with the new version we can avoid this problem.
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 04, 2009, 02:34:09 PM
Shoutbox code is really difficut to add.

And as you have already see in my previous posts you have to have shoutbox enabled somewhere in your site in order for it to work. Thats why I have removed it from the block that I use in my site...
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 04, 2009, 09:03:57 PM
OK finally I think I have something !

I've done a major code tidy up and decided it was worth making it work on 0.9.8 and TP 1.0 which is why it took me a while.

I'd like to get it XHTML compliant too at some point, there's only a little left to do on that.  But here's a demo of it on my forum, just to see if I am going in the right direction.

I think we could improve on some of the things like 'Latest Files', but this is expandable in an easier way now.  We can fine tune it later.

http://aidreams.co.uk/forum/index.php?page=113

Have patience with my site, I noticed it was a little slow today...

I decided to package the whole thing into a mod as well, so it's simpler to install.  Details later.

Oh yes, we need to say thanks to IchBin for helping me grasp a few TP things too :)  Thanks !
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 04, 2009, 09:22:40 PM
Well done, so far!  ;)
Title: Re: [Block] Multi Tab Block! (new)
Post by: IchBin on September 04, 2009, 09:29:41 PM
Pure awesomeness Freddy. Love the look of it on your site. Glad I could help a little too! :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 04, 2009, 10:10:06 PM
 ;D Thanks guys.  I will drop in the package tomorrow after a little more tweaking.

Dimdom, is this basically what you want now ?

Cheers :)
Title: Re: [Block] Multi Tab Block! (new)
Post by: dimdom on September 05, 2009, 12:32:21 AM
Yes, that was exactly what I was looking for. I will add the SMF gallery block and i wll be ok.

Youve done an excellent job, freddy888!
Title: Re: [Block] Multi Tab Block! (new)
Post by: ZarPrime on September 05, 2009, 02:45:43 AM
Excellent job on this freddy. :up:

ZarPrime
Title: Re: [Block] Multi Tab Block! (new)
Post by: Freddy on September 05, 2009, 05:36:52 PM
Thanks dimdom and Zar :)

It was an interesting project, and actually helped me learn a few new tricks so I was happy to work on it.

As promised you can find it all here... (http://www.tinyportal.net/index.php/topic,30787.msg245804.html#msg245804)

I thought is best to start a new topic.

There's probably a lot more that can be done, but you just have to draw the line somewhere.  I did include an alternative way of showing 'new files' which you will find in the code.

I'll probably work on the XHTML at some point, but I think it is mostly ok.