collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 382
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Creating a Panels Tab in a Custom PHP Block Completed  (Read 89533 times)

0 Members and 1 Guest are viewing this topic.

Offline Blue

  • Customizer
  • *
  • Posts: 379
  • Gender: Male
  • Block Maker? =P
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #80 on: August 24, 2011, 04:35:40 PM »
ID's Blue, also how can i make the tabs have colour in them please

Find this line in each tab and follow the instructions:
Code: [Select]
$include_boards = null; // IF ALL BOARDS null | IF SOME BOARDS array( ID1, ID2, ID3)
To make the tabs have colour you need to change the css file ;)
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #81 on: August 24, 2011, 11:37:44 PM »
thanks blue all good now  :thumbsup:

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #82 on: October 24, 2011, 11:11:24 PM »
Hi all not sure if it's a error with my host but i went to edit the names of the tabs & i get Forbidden
 You don't have permission to access /index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


my host said they have disabled mod security

smf 2.0.1 Sp 2.3.3

any one else getting that error or know of another reason?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #83 on: October 25, 2011, 12:43:12 AM »
It sounds like you now have a permission problem.
Please check the permission on your files, such as index.php.

You may want to try
755 for directories
655 or even 645 for files.

See if that works better.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #84 on: October 25, 2011, 02:48:47 AM »
what files & directories
?


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #85 on: October 25, 2011, 02:51:52 AM »
All files and directories in your SMF forum.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #86 on: October 25, 2011, 04:14:12 AM »
just a up date i checked all files folders they were all correct, i re hit up my host it was there error all resolved, waiting to see what they did to fix it

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #87 on: October 25, 2011, 12:59:39 PM »
I'm glad your host was able to find the error.  Sometimes it takes a lot of work on your part to convince tech support that the servers have caused a problem.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline kenng

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #88 on: October 31, 2011, 12:02:01 PM »
Hi guys, How can I make this kind of layout? many thanks!

Offline ZiFFeL

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: None
  • SP Version: None
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #89 on: December 15, 2011, 04:16:01 PM »
Hi, first of all thank you very much.

I have put your block without problems, but i would like to put only the new topics, no the answers for the posts, can be possible?

Regards an thank you before hand

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #90 on: February 23, 2012, 01:22:49 AM »
Hi  Is there a way i can stop the scrolling once clicked on, i have a youtube video i would like it to stop scrolling once clicked on is this possible?

Offline thecoo1est

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #91 on: March 20, 2012, 08:43:28 PM »
love this block, thanks to all who helped make it possible, is there anyway to get the content to fade in when a tab is clicked?

Offline Dylert

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: None
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #92 on: November 13, 2013, 06:41:45 PM »
This block is really awesome! Thanks a lot!

One question: I would like to add forum-name and topic starter to the output table. (And maybe replies/views)
How can I do that?? :)
« Last Edit: November 16, 2013, 06:56:39 PM by Dylert »

Offline Dylert

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: None
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #93 on: November 16, 2013, 05:18:34 AM »
Does anybody know how I can get the name of the boards and thread starter into this block? I mean, now it only shows topic, poster and date, and I want to add thread starter and board name to the output table. Anyone?

Code: [Select]
<?php
/*
The Setup is inside the tab!
Have Fun,
Blue @ Simple Portal.net

Credits to nob4uask for the Tabs tutorial: Thank You!
*/


// Basic Coding before TABS
echo '
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> 
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
 
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup"> 
<li class="TabbedPanelsTab" tabindex="0">All Boards</li> 
<li class="TabbedPanelsTab" tabindex="0">Board IDs 1</li>
        <li class="TabbedPanelsTab" tabindex="0">Board IDs 2</li> 
</ul> 
<div class="TabbedPanelsContentGroup"> 
<div class="TabbedPanelsContent">'
;

/***************************************************************************
*************** START THE TAB **********************************************
***************************************************************************/


// [SETUP HERE] //
$num_recent 25; // HOW MANY RECENT TOPICS TO OUTPUT?
$include_boards null; // IF ALL BOARDS null | IF SOME BOARDS array( ID1, ID2, ID3)



// code, code, code and some more code bahhh!
global $smcFunc$scripturl$context$settings$db_prefix$user_info;

if (is_array($include_boards) || (int) $include_boards === $include_boards)
{
$include_boards is_array($include_boards) ? $include_boards : array($include_boards);
}
elseif ($include_boards != null)
{
$output_method $include_boards;
$include_boards = array();
}

$topics_result $smcFunc['db_query']('''
   SELECT m.poster_name, m.poster_time, m.id_msg, t.id_member_updated, m.subject, m.body, m.id_topic, b.name, b.id_board, t.id_last_msg, u.avatar, g.online_color, ' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}topics AS t
   INNER JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)
   INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
   LEFT JOIN {db_prefix}members AS u ON (t.id_member_updated = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' 
'') . '  
   WHERE m.approved=1' 
. (empty($include_boards) ? '' '
AND b.id_board IN ({array_int:include_boards})'
) . '
   ORDER BY t.id_last_msg DESC
   LIMIT ' 
$num_recent
array(
'current_member' => $user_info['id'],
'include_boards' => empty($include_boards) ? '' $include_boards,
)   
   );
$topics = array();
while (
$row_topics $smcFunc['db_fetch_assoc']($topics_result))
{
   
$topics[] = array(
      
'topic' => $row_topics['id_topic'],
      
'poster' => '<a style="color: ' $row_topics['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_topics['id_member_updated'] . '">' $row_topics['poster_name'] . '</a>',
      
'link' => '<a title="In&nbsp;' $row_topics['name'] .'" href="' $scripturl '?topic=' $row_topics['id_topic'] . '.msg' $row_topics['id_last_msg'] . ';topicseen#new">' $row_topics['subject'] . '</a>',
      
'href' => $scripturl '?topic=' $row_topics['id_topic'] . '.msg' $row_topics['id_last_msg'] . ';topicseen#new',
  'time' => timeformat($row_topics['poster_time']),
  'new' => !empty($row_topics['is_read'])
   );
}
$smcFunc['db_free_result']($topics_result);
echo '
<div class="tabsmenucontent" style="padding: 2px">
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor">
<tr class="titlebg">
                <td valign="middle">Topic</td>
<td valign="middle">Poster</td>
<td valign="middle">Time</td>
<td valign="middle"></td>
</tr>'
;

foreach ($topics as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">'
$topic['link'];

// new log! What a headache!
if (!$topic['new'] && $context['user']['is_logged'])
echo '
<a href="'
$scripturl'?topic='$topic['topic'], '.from'$topic['time'], '#new"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="new" border="0" /></a>';

echo '
</td>
<td class="windowbg2" valign="middle">'
$topic['poster'], '</td>
<td class="windowbg2" valign="middle">'
$topic['time'], '</td>
<td class="windowbg2" valign="middle">'
;

if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="'
$topic['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="Last Post" title="Last Post" border="0" style="float: right;" /></a>';
}

echo 
'
</td>
</tr>
</table>
</div>'
;
/***************************************************************************
*************** END THE TAB ************************************************
***************************************************************************/

echo'</div> 
<div class="TabbedPanelsContent">'
;

/***************************************************************************
*************** START THE TAB **********************************************
***************************************************************************/


// [SETUP HERE] //
$num_recent 25; // HOW MANY RECENT TOPICS TO OUTPUT?
$include_boards = array(1); // IF ALL BOARDS null | IF SOME BOARDS array( ID1, ID2, ID3)



// code, code, code and some more code bahhh!
global $smcFunc$scripturl$context$settings$db_prefix$user_info;

if (is_array($include_boards) || (int) $include_boards === $include_boards)
{
$include_boards is_array($include_boards) ? $include_boards : array($include_boards);
}
elseif ($include_boards != null)
{
$output_method $include_boards;
$include_boards = array();
}

$topics_result $smcFunc['db_query']('''
   SELECT m.poster_name, m.poster_time, m.id_msg, t.id_member_updated, m.subject, m.body, m.id_topic, b.name, b.id_board, t.id_last_msg, u.avatar, g.online_color, ' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}topics AS t
   INNER JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)
   INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
   LEFT JOIN {db_prefix}members AS u ON (t.id_member_updated = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' 
'') . '  
   WHERE m.approved=1' 
. (empty($include_boards) ? '' '
AND b.id_board IN ({array_int:include_boards})'
) . '
   ORDER BY t.id_last_msg DESC
   LIMIT ' 
$num_recent
array(
'current_member' => $user_info['id'],
'include_boards' => empty($include_boards) ? '' $include_boards,
)   
   );
$topics = array();
while (
$row_topics $smcFunc['db_fetch_assoc']($topics_result))
{
   
$topics[] = array(
      
'topic' => $row_topics['id_topic'],
      
'poster' => '<a style="color: ' $row_topics['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_topics['id_member_updated'] . '">' $row_topics['poster_name'] . '</a>',
      
'link' => '<a title="In&nbsp;' $row_topics['name'] .'" href="' $scripturl '?topic=' $row_topics['id_topic'] . '.msg' $row_topics['id_last_msg'] . ';topicseen#new">' $row_topics['subject'] . '</a>',
      
'href' => $scripturl '?topic=' $row_topics['id_topic'] . '.msg' $row_topics['id_last_msg'] . ';topicseen#new',
  'time' => timeformat($row_topics['poster_time']),
  'new' => !empty($row_topics['is_read'])
   );
}
$smcFunc['db_free_result']($topics_result);
echo '
<div class="tabsmenucontent" style="padding: 2px">
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor">
<tr class="titlebg">
                <td valign="middle">Topic</td>
<td valign="middle">Poster</td>
<td valign="middle">Time</td>
<td valign="middle"></td>
</tr>'
;

foreach ($topics as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">'
$topic['link'];

// new log! What a headache!
if (!$topic['new'] && $context['user']['is_logged'])
echo '
<a href="'
$scripturl'?topic='$topic['topic'], '.from'$topic['time'], '#new"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="new" border="0" /></a>';

echo '
</td>
<td class="windowbg2" valign="middle">'
$topic['poster'], '</td>
<td class="windowbg2" valign="middle">'
$topic['time'], '</td>
<td class="windowbg2" valign="middle">'
;

if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="'
$topic['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="Last Post" title="Last Post" border="0" style="float: right;" /></a>';
}

echo 
'
</td>
</tr>
</table>
</div>'
;
/***************************************************************************
*************** END THE TAB ************************************************
***************************************************************************/


echo'</div> 
<div class="TabbedPanelsContent">'
;

/***************************************************************************
*************** START THE TAB **********************************************
***************************************************************************/


// [SETUP HERE] //
$num_recent 25; // HOW MANY RECENT TOPICS TO OUTPUT?
$include_boards = array(2); // IF ALL BOARDS null | IF SOME BOARDS array( ID1, ID2, ID3)



// code, code, code and some more code bahhh!
global $smcFunc$scripturl$context$settings$db_prefix$user_info;

if (is_array($include_boards) || (int) $include_boards === $include_boards)
{
$include_boards is_array($include_boards) ? $include_boards : array($include_boards);
}
elseif ($include_boards != null)
{
$output_method $include_boards;
$include_boards = array();
}

$topics_result $smcFunc['db_query']('''
   SELECT m.poster_name, m.poster_time, m.id_msg, t.id_member_updated, m.subject, m.body, m.id_topic, b.name, b.id_board, t.id_last_msg, u.avatar, g.online_color, ' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}topics AS t
   INNER JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)
   INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
   LEFT JOIN {db_prefix}members AS u ON (t.id_member_updated = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' 
'') . '  
   WHERE m.approved=1' 
. (empty($include_boards) ? '' '
AND b.id_board IN ({array_int:include_boards})'
) . '
   ORDER BY t.id_last_msg DESC
   LIMIT ' 
$num_recent
array(
'current_member' => $user_info['id'],
'include_boards' => empty($include_boards) ? '' $include_boards,
)   
   );
$topics = array();
while (
$row_topics $smcFunc['db_fetch_assoc']($topics_result))
{
   
$topics[] = array(
      
'topic' => $row_topics['id_topic'],
      
'poster' => '<a style="color: ' $row_topics['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_topics['id_member_updated'] . '">' $row_topics['poster_name'] . '</a>',
      
'link' => '<a title="In&nbsp;' $row_topics['name'] .'" href="' $scripturl '?topic=' $row_topics['id_topic'] . '.msg' $row_topics['id_last_msg'] . ';topicseen#new">' $row_topics['subject'] . '</a>',
      
'href' => $scripturl '?topic=' $row_topics['id_topic'] . '.msg' $row_topics['id_last_msg'] . ';topicseen#new',
  'time' => timeformat($row_topics['poster_time']),
  'new' => !empty($row_topics['is_read'])
   );
}
$smcFunc['db_free_result']($topics_result);
echo '
<div class="tabsmenucontent" style="padding: 2px">
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor">
<tr class="titlebg">
                <td valign="middle">Topic</td>
<td valign="middle">Poster</td>
<td valign="middle">Time</td>
<td valign="middle"></td>
</tr>'
;

foreach ($topics as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">'
$topic['link'];

// new log! What a headache!
if (!$topic['new'] && $context['user']['is_logged'])
echo '
<a href="'
$scripturl'?topic='$topic['topic'], '.from'$topic['time'], '#new"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="new" border="0" /></a>';

echo '
</td>
<td class="windowbg2" valign="middle">'
$topic['poster'], '</td>
<td class="windowbg2" valign="middle">'
$topic['time'], '</td>
<td class="windowbg2" valign="middle">'
;

if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="'
$topic['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="Last Post" title="Last Post" border="0" style="float: right;" /></a>';
}

echo 
'
</td>
</tr>
</table>
</div>'
;
/***************************************************************************
*************** END THE TAB ************************************************
***************************************************************************/

echo'</div> 
</div> 
</div>
 
<script type="text/javascript"> 
<!-- 
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); 
Spry.Widget.TabbedPanels("TabbedPanels2");
//--> 
</script>
'
;


?>

Offline josh4596

  • Semi Newbie
  • *
  • Posts: 21
  • SMF Version: 2.0.9
  • SP Version: 2.3.6
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #94 on: April 09, 2015, 09:31:30 AM »
Heres a small change I made to this:

Code: [Select]
<?php

global $context$settings;

echo 
'
<script src="' 
$settings['theme_url'] .  '/CustomCoding/SpryTabbedPanels.js" type="text/javascript"></script> 
<link href="' 
$settings['theme_url'] .  '/CustomCoding/RoundedTabs.css" rel="stylesheet" type="text/css" />

<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup"> 
<li class="TabbedPanelsTab" tabindex="0">Tab1</li> 
<li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 3</li> 
<li class="TabbedPanelsTab" tabindex="0">Tab 4</li> 
<li class="TabbedPanelsTab" tabindex="0">Tab 5</li> 
</ul> 
<div class="TabbedPanelsContentGroup"> 
<div class="TabbedPanelsContent">test</div> 
<div class="TabbedPanelsContent"></div> 
<div class="TabbedPanelsContent"></div> 
<div class="TabbedPanelsContent"></div> 
<div class="TabbedPanelsContent"></div> 
</div> 
</div>
 
<script type="text/javascript"> 
<!-- 
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); 
//--> 
</script>
'
;


?>
All this does is pull the styling from your_current_theme_folder/CustomCoding/file.css. That way you can have a different look for the tabs on every theme. So you'll have to add a CustomCoding folder to every theme directory and put both files from the OP in that directory, then make sure the links at the top of the code direct to them properly. After that you can edit the css files to your liking. I've attached 2 screenshots of 2 of my styles as an example.
« Last Edit: April 09, 2015, 11:55:14 AM by josh4596 »

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #95 on: April 09, 2015, 11:09:17 PM »
Is it possible to adjust this tab in order to show forum categories?
My aim would be to get rid of all categories in the board index and show just this block, replacing the standard display :) Something like Tab1=Category 1 Tab2=Category 2 and so on...
Maybe importing the style from the normal categories display? It would be easier...
Thanks in advance!
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #96 on: June 14, 2015, 08:18:53 PM »
Hi all need a bit of help i updated simple portal to 2.3.6 no errors on install & now it seems to have made the tabbed  go out of whack the menu across the top  see pic attached & code  no code was changed

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #97 on: June 17, 2015, 11:03:31 AM »
Can't really help without an URL and a very detailed description of the issue as I can't figure out anything from those 2 mini-screenshots...
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline swoodie

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #98 on: June 19, 2015, 06:52:31 AM »
Can't really help without an URL and a very detailed description of the issue as I can't figure out anything from those 2 mini-screenshots...

thank you for your reply for some strange reason  after up grading the path changed to the  java script in the block all sorted now thank you

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Creating a Panels Tab in a Custom PHP Block Completed
« Reply #99 on: June 19, 2015, 06:59:29 AM »
Well, glad it did ;D It probably knew it was going to be fixed anyways :P
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis