Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Module CMPS: AJAX Tabbed Content Details »»
Module CMPS: AJAX Tabbed Content
Version: 1.5, by bobster65 bobster65 is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.x Rating:
Released: 08-07-2007 Last Update: 08-16-2007 Installs: 71
Template Edits
Additional Files Translations  
No support by the author.

AJAX Tabs - Version 1.5

Note: Version 1.0 is still available as a secondary option and is located in post 2 of this thread.

Note 2: Altho this "How To" is written for implementation within CMPS, this can be easily implemented within vB , ie on custom vB pages or within current vB pages.

Whats changed within this release?: This new version (based on the AJAX Tabs script written by Dynamic Drive - http://www.dynamicdrive.com/dynamici...tent/index.htm) utilizes Ajax to display a selection of external content on your page inside a DIV and via CSS tabs. Below lists the features of this script that together make it highly adaptable in the real world:
  • Fetch and display an external page (from the same domain) inside a container when a tab is clicked on.
  • Add a "default" content inside the container to either be shown while no tabs are selected, or to be associated with a specific tab. The default content is added directly to your page and not fetched via Ajax, for sake of server efficiency.
  • For each tab, you can not only fetch an external page to be shown, but also load external .css and .js files associated with that page if desired.
  • Supports session only persistence, so the last tab user clicked on is remembered if he/she returns to the page within the same browser session.
  • Supports multiple Ajax Tabs Contents on the same page.
  • Fully unobtrusive, search engine friendly script. The tabs are simply list based links. For search engines or browsers with JavaScript disabled, the contents will just load as actual pages (instead of inline via Ajax).
As I mentioned in the previous release, I received many emails & PMs about how I implemented AJAX Tabbed Modules within vBadvance & vB, so instead of replying to each one seperately, I went ahead and wrote up this "how to". I hope that its easy to follow along, answers your questions and meets your needs. If you are reading this and wondering what a tabbed module is, check out the attached screen shots for a visual.

This is what I've done so far to implement AJAX Tabs functionality within vBadvance for my websites and others....

CMPS Version Note: Coded for CMPS v3.0 RC1. Modifications can be made to the php files (Require Back-End) to work with CMPS v2.x

CMPS Module Type: TEMPLATE w/Alternative Module Wrapper Template
Templates: adv_portal_Tab_Block, adv_portal_alt_module_wrapper (optional)
Files: ajaxtabs.js, ajaxtabs.css, Sample Content Files, images(3)

Note: I've included sample files in the attached Zip File to use with the step by step how to.

Step 1. Upload the ajaxtabs directory (located in the attached Zip File) to the FORUMS Root.
This directory contains the ajaxtabs.js file & the ajaxtabs.css file
path example: /www/forums/ajaxtabs/ajaxtabs.js

Step 2. Modify CSS file.
Change paths to images to reflect your domain and forum root (2 lines)...

Note: Additional Modifications to this file can be made once you get the initial sample system up and running.

CSS file - Name: ajaxtabs.css
Code:
.shadetabs{
padding: 3px 0;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0;
font: bold 12px Verdana;
list-style-type: none;
text-align: left; /*set to left, center, or right to align the menu as desired*/
}

.shadetabs li{
display: inline;
margin: 0;
}

.shadetabs li a{
text-decoration: none;
padding: 3px 7px;
margin-right: 3px;
border: 1px solid #778;
color: #FFFFFF;
background: #343958 url(http://www.domain.com/forums/ajaxtabs/shade.gif) top left repeat-x;
}

.shadetabs li a:visited{
color: #FFFFFF;
}

.shadetabs li a:hover{
text-decoration: underline;
color: #FFFFFF;
}

.shadetabs li.selected{
position: relative;
top: 1px;
}

.shadetabs li.selected a{ /*selected main tab style */
background-image: url(http://www.domain.com/forums/ajaxtabs/shadeactive.gif);
border-bottom-color: gray;
}

.shadetabs li.selected a:hover{ /*selected main tab style */
text-decoration: none;
}

.contentstyle{
border: 1px solid gray;
width: 425px;
margin-bottom: 0em; padding: 2px;
background: white;
}

Step 3. Create, Name and Upload Multiple "Content" files.
I've included working samples in the attached Zip File.
The location I chose for these was the FORUMS root.
path example: /www/forums
You can name these files anything you want. For example, I chose a naming convention - tabexternal.htm, tabexternal2.php, tabrecentnews.php, tabvbookie.php, ..etc etc

Note: Modifications to these files can be made once you get the initial system up and running.

Sample PHP "Content" file - Sample name: tabexternal.php
PHP Code:
<?php 

// ####################### SET PHP ENVIRONMENT ###########################  
error_reporting(E_ALL & ~E_NOTICE);  

// #################### DEFINE IMPORTANT CONSTANTS #######################  
define('NO_REGISTER_GLOBALS'1);  
define('THIS_SCRIPT''tabcontent'); // change this depending on your filename  

// ################### PRE-CACHE TEMPLATES AND DATA ######################  
// get special phrase groups  
$phrasegroups = array(  

);  

// get special data templates from the datastore  
$specialtemplates = array(  
      
);  

// pre-cache templates used by all actions  
$globaltemplates = array(  
    
'TAB',  
);  

// pre-cache templates used by specific actions  
$actiontemplates = array(  

);  

// ######################### REQUIRE BACK-END ############################  
require_once('./global.php');  
require_once(
'./includes/vba_cmps_include_template.php'); 
require_once(
'./includes/vba_cmps_global.php'); 

// #######################################################################  
// ######################## START MAIN SCRIPT ############################  
// #######################################################################  


?> 

<?php

echo 'HELLO WORLD!  Welcome to AJAX TABs ....';

?>
Sample HTM "Content" file - Sample name: tabexternal.htm
Code:
<img src="ajaxtabs/bird.jpg" style="float: left; margin: 0 10px 5px; border: 1px solid gray" />
Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
<br style="clear: left" />


Step 4. (optional) Create an Alternative Module Wrapper Template.
I chose to do this, because I didn't want to use the standard Module Wrapper that comes default with vBadvanced.
NOTE: Use the default wrapper if you choose not to create your own custom one. I named mine - adv_portal_alt_module_wrapper

Alternative Module Wrapper Template - Sample name: adv_portal_alt_module_wrapper
Code:
<div style="padding-bottom:$vba_style[portal_vspace]px">
	<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"  width="100%">
		
		<tbody id="collapseobj_module_$mods[collapse]" style="$modcollapse">
			<if condition="$show['tablerow']">
				<tr>
					<td class="$bgclass">
						$modulehtml
					</td>
				</tr>
			<else />
				$modulehtml
			</if>
		</tbody>
	</table>
</div>

Step 5. Create a new Template.
This template will be the one that you include with the module that you will create in Step 6. I've included the code for the template below, HOWEVER, there are some edits that you will need to make to the code based upon steps 1-3 above.

Custom Template Sample name: adv_portal_Tab_Block_Main
Code:
<tr><td>
<head>
<link rel="stylesheet" type="text/css" href="/forums/ajaxtabs/ajaxtabs.css" />
<script type="text/javascript" src="/forums/ajaxtabs/ajaxtabs.js">
/***********************************************
* Ajax Tabs Content script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
<body>

<ul id="maintab" class="shadetabs">
<li class="selected"><a href="http://www.domain.com/forums/tabexternal.php" rel="ajaxcontentarea">Tab 1</a></li>
<li><a href="http://www.domain.com/forums/tabexternal2.php" rel="ajaxcontentarea">Tab 2</a></li>
<li><a href="http://www.domain.com/forums/tabexternal3.php" rel="ajaxcontentarea">Tab 3</a></li>
<li><a href="http://www.domain.com/forums/tabexternal4.php" rel="ajaxcontentarea">Tab 4</a></li>
</ul>

<div id="ajaxcontentarea" class="contentstyle">
<p>Congrats, AJAX Tabbed Content is working on your site!</p>
</div>

<script type="text/javascript">
//Start Ajax tabs script for UL with id="maintab" Separate multiple ids each with a comma.
startajaxtabs("maintab")
</script>
</body>
</td></tr>
EDITS NEEDED TO THE ABOVE TEMPLATE:

EDIT 1 - Path location of the ajaxtabs.css file created in step 2. Simply edit this line in the template to the correct path.
Code:
<link rel="stylesheet" type="text/css" href="/forums/ajaxtabs/ajaxtabs.css" />
EDIT 2 - Path location of the ajaxtabs.js file in step 1. Simply edit this line in the template to the correct path where you uploaded the ahahLib.js file.
Code:
<script type="text/javascript" src="/forums/ajaxtabs/ajaxtabs.js">
EDIT 3 - Path location of the "Content" file(s) created in step 3. Simply edit the line(s) in the template to the correct path where you uploaded the PHP file(s).
Code:
<li><a href="http://www.domain.com/forums/tabexternal4.php" rel="ajaxcontentarea">Tab 4</a></li>

Step 6. Create a new CMPS TEMPLATE Module.
Name it what ever you like. Include the template that you created in Step 5 above. Make sure that you either use the Module Wrapper Template OR the Alternative Module Wrapper Template that you created in optional Step 4 above. Give permission(s) to the user groups that you want to be able to view this.

Step 7. Add the Module to a CMPS page.
Add the module created in Step 6 above to any CMPS page (make a test page if you want to)...

Step 8. Load the CMPS page that you added the module to.
If you performed the above steps correctly, the result will be a tabbed block module with 4 tabs named Tab 1, Tab 2, Tab 3, Tab 4. The content for Tab 1 will initially say "Congrats, AJAX Tabbed Content is working on your site!" as that will preload, Click on Tab 1 and it will retrieve via AJAX, the code created in the external file for tab 1. Click on the other tabs to retrieve the info created within those external files..


CUSTOMIZATION

Style: Modify CSS File in Step 2 to match the Style of your site.

Tab Names: Modify Template created in Step 5 to change the NAME of the tabs themselves - ie.. from Tab 1 to Announcements (see below)

Code:
<li><a href="http://www.domain.com/forums/tabexternal.php" rel="ajaxcontentarea">Announcements</a></li>

Content: Modify "Content" File(s) created in Step 3 to generate content. You can add static content or Dynamic Content. Below is a very very basic sample of what can be done.

Sample mix of static and dynamic content
PHP Code:
<?php

echo '<table cellspacing="2" cellpadding="0" width=100%><tr> <td class="alt2"><span class="smallfont">Welcome Back To YOURSITENAMEHERE&nbsp;<b>' $vbulletin->userinfo['username'] . '!</b><br><br>Hope you are enjoying the off season so far.<br><br> The Draft, Mini Camps & Hall of Fame Weekend Events are complete, Train Camps are in full swing and Preseason Games have started to kick off!<br><br>
Im sure these next few weeks will be fun to follow and make the upcoming season even more exciting. <br><br>Good luck with your team&nbsp;<b>' 
.  $vbulletin->userinfo['username'] . '.</b></span></td></tr>';

?>
NOTE: You can get as creative as you want to with content (Both static and Dynamic). For example, I took code from the recentthreads.php file, modified it and included that as tabbed content to display recent threads within a tab on my site (as seen in the screen shots attached in Post 1 of this thread). (I've included samples with instructions of this within the zip file. Side Note: use/modify these samples at your own risk)


ADDING MORE TABS

To add more tabs, you will need to modify the template created in Step 5 and create a new "content" file for each new tab (as explained in Step 3).

Step 1. Add the following line of code to the Template that you created in Step 5 for each new Tab that you want to appear. Its a good idea when you add the lines that you keep them in order with the other lines currently in the file.

Code:
<li><a href="http://www.domain.com/forums/CONTENT FILE" rel="ajaxcontentarea">TAB NAME</a></li>
Example:
Code:
<li><a href="http://www.domain.com/forums/tabcontent5.php" rel="ajaxcontentarea">Sports News</a></li>
Step 2. Upload the newly created "Content" file (as explained in Step 3) to your FORUMS root.


If you want to read up on AJAX Tabs, check out the Ajax Tabs Content script over at Dynamic Drive (http://www.dynamicdrive.com/dynamici...tent/index.htm)

....thats it in a nutshell.... I do hope that I explained things well enough to at least get a head start on AJAX Tabbed Modules. Let me know if you have any problems or need further explanation on anything...

Thanks and enjoy Bobster

Screen Shots Explained:

The 1st is an example of some dynamic content based on the user.
The 2nd is an example of modified recentthreads.php used within a tab.
The 3rd is an example of using modified vbarticles within a tab.
The 4th and 5th are examples of custom dynamic content within a tab.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 02-22-2008, 11:35 PM
CoffeeToki's Avatar
CoffeeToki CoffeeToki is offline
 
Join Date: Nov 2007
Location: Europe
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow~ I just checked it out and installed them! Awesomeness to the Max! ^__^ Thanks, again! (Runs off to play with the CSS and customize!)
Reply With Quote
  #93  
Old 04-23-2008, 05:49 PM
davewmack davewmack is offline
 
Join Date: Jun 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any way to add the rotate function to this?
Reply With Quote
  #94  
Old 04-23-2008, 06:01 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by davewmack View Post
is there any way to add the rotate function to this?
I released version 2 of this here: https://vborg.vbsupport.ru/showthread.php?t=161197

It has the rotation ability..
Reply With Quote
  #95  
Old 06-17-2008, 07:05 PM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello i have a question
how can i change the ordering show list of threads

i would like to see the last 10 threads insted of the last 10 replay....


Coud you explain me how to turn Default Sort Field by Thread start Time ?

PHP Code:

if ($_GET['content'] == 2) {   

echo
'<table cellspacing="2" cellpadding="0" width=100%><tr> <td class="thead" width="50%">Tytuł - Data - Odpowiedzi</td></tr>';

$recthread_tempname 'exp';

        if (
$recthread_tempname == 'exp')
        {
                eval(
'$home[$mods[\'modid\']][\'content\'] = "' fetch_template('adv_portal_recthreads_exp_head') . '";');

                
$mods['colspan'] = 4;

                if (
$mod_options['portal_threads_lastpost'])
                {
                        
$mods['colspan']++;
                }

                if (
$mod_options['portal_threads_showforum'])
                {
                        
$mods['colspan']++;
                }
        }

        
$vba_threads_condition '';

        
// Threads & forums
        
if (!empty($mod_options['portal_threadids']) AND is_array($mod_options['portal_threadids']))
        {
                
$vba_threads_condition 'AND (thread.threadid IN(' 16 ')';
        }
        if (!empty(
$mod_options['portal_threads_forumids']) AND is_array($mod_options['portal_threads_forumids']))
        {
                
$mods['inforums'] = $mod_options['portal_threads_forumids'];

                if (
$mod_options['portal_applypermissions'])
                {
                        
$mods['inforums'] = array_diff($mods['inforums'], $adv_canviewforums);
                }
                if (empty(
$mods['inforums']))
                {
                        if (empty(
$mod_options['portal_threadids']))
                        {
                                
$mods['nodisplay'] = true;
                        }
                }
                else
                {
                        
$vba_threads_condition .= iif(!empty($mod_options['portal_threadids']), ' OR thread'' AND (thread') . '.forumid IN(' 16 ')';
                }
        }

        
// Add ) if we had forum or thread ids
        
if ($vba_threads_condition)
        {
                
$vba_threads_condition .= 'AND (thread.threadid IN(' 16 ')';
        }

        if (!
$mods['inforums'] AND !empty($adv_canviewforums) AND $mod_options['portal_applypermissions'])
        {
                
$vba_threads_condition .= ' AND thread.forumid NOT IN(' implode(','$adv_canviewforums) . ')';
        }

        
$show['lastpost'] = $mod_options['portal_threads_lastpost'];

        if (!
$mods['nodisplay'])
        {
                if (
$mod_options['portal_threads_orderby'] == 'dateline')
                {
                        
$mod_options['portal_threads_orderby'] = 'thread.dateline';
                }

                if (!
$mod_options['portal_threads_orderby'])
                {
                        
$mod_options['portal_threads_orderby'] = 'lastpost';
                }
                if (!
$mod_options['portal_threads_direction'])
                {
                        
$mod_options['portal_threads_direction'] = 'DESC';
                }

                
$markinglimit = (TIMENOW - ($vbulletin->options['markinglimit'] * 86400));

                
// Rating
                
$oldforumratings $foruminfo['allowratings'];
                
$foruminfo['allowratings'] = $mod_options['portal_threads_showrating'];

                
$rtrating_fields '';
                if (
$mod_options['portal_threads_showrating'] OR $mod_options['portal_threads_orderby'] == 'voteavg')
                {
                        
$rtrating_fields 'IF(votenum >= ' $vbulletin->options['showvotes'] . ', votenum, 0) AS votenum, IF(votenum >= ' $vbulletin->options['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg, votetotal,';
                }

                
$rthread_fields '';
                
$rthread_join '';

                
// Subscriptions
                
if ($mod_options['portal_threads_showsubscribed'] AND $vbulletin->userinfo['userid'])
                {
                        
$rthread_fields .= ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed';
                        
$rthread_join .= ' LEFT JOIN ' TABLE_PREFIX 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = ' $vbulletin->userinfo['userid'] . ')';
                }

                
// Thread Icon
                
if ($mod_options['portal_threads_showicon'])
                {
                        
$rthread_fields .= ', thread.iconid AS threadiconid, iconpath AS threadiconpath';
                        
$rthread_join .= ' LEFT JOIN ' TABLE_PREFIX 'icon AS icon ON (icon.iconid = thread.iconid)';
                }

                
// Preview
                
if ($mod_options['portal_threads_showpreview'] AND $vbulletin->options['threadpreview'])
                {
                        
$rthread_fields .= ', post.pagetext AS preview';
                        
$rthread_join .= ' LEFT JOIN ' TABLE_PREFIX 'post AS post ON (post.postid = thread.firstpostid)';
                }

                
// Database read marking
                
if ($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'])
                {
                        
$rthread_fields .= ', threadread.readtime AS threadread';
                        
$rthread_join .= ' LEFT JOIN ' TABLE_PREFIX 'threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = ' $vbulletin->userinfo['userid'] . ')
                                LEFT JOIN ' 
TABLE_PREFIX 'forumread AS forumread ON (thread.forumid = forumread.forumid AND forumread.userid = ' $vbulletin->userinfo['userid'] . ')';
                }

                
// Attach paperclip
                
if ($mod_options['portal_threads_showpaperclip'])
                {
                        
$rthread_fields .= ', thread.attach';
                }

                
// COMMENTED OUT FOR TESTING
                
($hook vBulletinHook::fetch_hook('vba_cmps_module_recthreads_start')) ? eval($hook) : false;

                
$threads $db->query_read("
                    SELECT 
$rtrating_fields thread.threadid, thread.title, thread.replycount, postusername, postuserid, thread.dateline AS postdateline, IF(views <= thread.replycount, thread.replycount+1, views) AS views, thread.lastposter, thread.lastpost, thread.lastpostid, pollid, thread.forumid, thread.open, sticky
                    
$rthread_fields
                        FROM " 
TABLE_PREFIX "thread as thread
                        
$rthread_join
                        WHERE open != 10
                                AND thread.visible = 1 " 
.
                                
iif($mod_options['portal_threads_cutoffdate'],
                                        
'AND thread.lastpost > ' . (TIMENOW $mod_options['portal_threads_cutoffdate'] * 86400)
                                ) .
                                
iif($ignusers,
                                        
' AND thread.postuserid NOT IN(' $ignusers ')'
                                
) . "
                                AND thread.forumid=198 OR thread.forumid=197
                        ORDER BY 
$mod_options[portal_threads_orderby] $mod_options[portal_threads_direction]
                        LIMIT 10
                "
);
                
$mods['threadcount'] = $db->num_rows($threads);

                if (
$mods['threadcount'])
                {
                        require_once(
DIR '/includes/functions_forumdisplay.php');

                        if (
$mod_options['portal_threads_multipage'])
                        {
                                
$vbulletin->templatecache['threadbit_pagelink'] = str_replace(
                                        
'"$address"',
                                        
'"' $vbulletin->options['bburl'] . '/$address"',
                                        
$vbulletin->templatecache['threadbit_pagelink']
                                );
                        }

                        
// Table cell classes
                        
$bgclass 'alt1';

                        if (
$show['lastpost'])
                        {
                                
// Don't need a variable since it's after a known class, just switch
                                
exec_switch_bg();
                        }

                        if (
$mod_options['portal_threads_replies'])
                        {
                                
$class_reply exec_switch_bg();
                        }

                        if (
$mod_options['portal_threads_views'])
                        {
                                
$class_view exec_switch_bg();
                        }

                        if (
$mod_options['portal_threads_showforum'])
                        {
                                
$class_ftitle exec_switch_bg();
                        }

                        
$recthreads_comma '';
                        if (
$mod_options['portal_threads_views'] AND $mod_options['portal_threads_replies'])
                        {
                                
$recthreads_comma ', ';
                        }
                }

                while (
$thread $db->fetch_array($threads))
                {
                        
$bgclass exec_switch_bg();

                        if (!(
$adv_forumperms[$thread['forumid']] & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
                        {
                                
$thread['preview'] = '';
                        }
                        else
                        {
                                
// The vB preview function can be intensive w/ long strings, so let's try to save some overhead
                                
$thread['preview'] = substr($thread['preview'], 0, ($vbulletin->options['threadpreview'] * 10));
                        }

                        
// Trim title
                        
if (strlen($thread['title']) > $mod_options['portal_threads_maxchars'] AND $mod_options['portal_threads_maxchars'])
                        {
                                
$thread['title'] = fetch_trimmed_title($thread['title'], $mod_options['portal_threads_maxchars']);
                        }

                        
// Check for long words that may stretch the page
                        
if ($mod_options['portal_threads_maxwordchars'])
                        {
                                
$thread['titlecheck'] = explode(' '$thread['title']);

                                if (!empty(
$thread['titlecheck']))
                                {
                                        
$thread['title'] = '';

                                        foreach (
$thread['titlecheck'] AS $key => $word)
                                        {
                                                if (!
$thread['titletrimmed'])
                                                {
                                                        if (
strlen($word) > $mod_options['portal_threads_maxwordchars'])
                                                        {
                                                                
$word fetch_trimmed_title($word$mod_options['portal_threads_maxwordchars']);
                                                                
$thread['titletrimmed'] = true;
                                                        }

                                                        if (
$thread['title'])
                                                        {
                                                                
$thread['title'] .= ' ';
                                                        }

                                                        
$thread['title'] .= $word;
                                                }
                                        }
                                }
                        }

                        
// Thread read marking
                        
if ($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'])
                        {
                                if (
$thread['threadread'] < $thread['forumread'])
                                {
                                        
$thread['threadread'] = $thread['forumread'];
                                }
                        }
                        else if (!
$vb_read_cookies[$thread['forumid']])
                        {
                                
$vb_read_cookies[$thread['forumid']] = max(fetch_bbarray_cookie('forum_view'$thread['forumid']), $markinglimit);
                        }

                        if (!
$thread['threadread'] AND $vb_read_cookies[$thread['forumid']] > $thread['lastpost'])
                        {
                                
$thread['threadread'] = TIMENOW;
                        }
                        else
                        {
                                
$thread['threadread'] = '-1';
                        }

                        
$thread process_thread_array(
                                
$thread,
                                
$thread['threadread'],
                                
$mod_options['portal_threads_showicon']
                        );

                        
// Rating
                        
$thread['rating'] = intval(round($thread['voteavg']));

                        (
$hook vBulletinHook::fetch_hook('vba_cmps_module_recthreadsbits')) ? eval($hook) : false;

                        eval(
'$home["$mods[modid]"][\'content\'] .= "' fetch_template('adv_portal_recthreads_exp') . '";');

                        
// define('BR', '<'.'BR'.'>');
                        // echo "{$thread['title']}".BR;
                        // echo "by: {$thread['postusername']}".BR;
                        // echo "{$thread[postdate]}" . " " . "{$thread[posttime]}".BR;
                        // echo BR;

                        
echo '<tr> <td class="alt1" class="smallfont">&raquo;&nbsp;<a href="http://www.clubbers.pl/showthread.php?t=' $thread[threadid] . '"title="' $thread[preview] . '">' $thread[title] . '</a> <span class="smallfont">&nbsp;&nbsp;&nbsp;' $thread[postdate] . '&nbsp;' $thread[posttime] . '&nbsp;-&nbsp;' $thread[replycount] . '&nbsp;Komentarzy</span></td></tr>';



                 }
        }

$tabstring $thread;


        
$db->free_result($threads);
        unset(
$thread);

        
$foruminfo['allowratings'] = $oldforumratings;

        if (!
$mods['threadcount'] OR $mods['nodisplay'])
        {
                
$show['tablerow'] = true;
                if (
$mods['modcol'] == 1)
                {
                        
$home["$mods[modid]"]['content'] = construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
                }
                else
                {
                        
$home["$mods[modid]"]['content'] = construct_phrase($vbphrase['no_x_to_display'], $vbphrase['threads']);
                }
        }

//}

echo "</table>";



}   


if (
$_GET['content'] == 3) {   

echo 
'<table cellspacing="2" cellpadding="0" width=100%><tr> <td class="alt2"><span class="smallfont">Welcome Back To YOURSITENAMEHERE&nbsp;<b>' $vbulletin->userinfo['username'] . '!</b><br><br>Hope you are enjoying the off season so far.<br><br> The Draft, Mini Camps & Hall of Fame Weekend Events are complete, Train Camps are in full swing and Preseason Games have started to kick off!<br><br>
Im sure these next few weeks will be fun to follow and make the upcoming season even more exciting. <br><br>Good luck with your team&nbsp;<b>' 
.  $vbulletin->userinfo['username'] . '.</b></span></td></tr>';


Thank you for help
Reply With Quote
  #96  
Old 09-03-2008, 04:42 PM
chiptz's Avatar
chiptz chiptz is offline
 
Join Date: Jan 2005
Location: Portugal
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great release, however i am not able to install it without vbadvanced, does anyone have this working only with vB?
Reply With Quote
  #97  
Old 09-03-2008, 05:27 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chiptz View Post
great release, however i am not able to install it without vbadvanced, does anyone have this working only with vB?
Ya, if you want it running on say the FORUM HOME

Add this block of code to the HEADINCLUDE Template

Code:
<link rel="stylesheet" type="text/css" href="ajaxtabs/ajaxtabs.css" />
<script type="text/javascript" src="ajaxtabs/ajaxtabs.js">
/***********************************************
* Ajax Tabs Content script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
Then add this block of code to the FORUMHOME Template where ever you wish to have to displayed.. ie before <!-- MAIN if you want it above the Forums) ..

Code:
<div id="ajaxcontentarea" style="border:1px solid gray; width:100%; height: 400px; background-color: white; padding: 2px">
</div>

<div id="maintab" class="modernbricksmenu2">
<ul>
<li class="selected"><a href="tabexternal.php" rel="ajaxcontentarea">Tab 1</a></li>
<li><a href="tabexternal2.php" rel="ajaxcontentarea">Tab 2</a></li>
<li><a href="tabexternal3.php" rel="ajaxcontentarea">Tab 3</a></li>
<li><a href="tabexternal4.php" rel="ajaxcontentarea">Tab 4</a></li>
</ul>
</div>
<br style="clear: left" />

<script type="text/javascript">
var mytabs=new ddajaxtabs("maintab", "ajaxcontentarea")
mytabs.setpersist(true)
mytabs.setselectedClassTarget("link") //"link" or "linkparent"
mytabs.init()
</script>
Reply With Quote
  #98  
Old 09-07-2008, 11:28 AM
chiptz's Avatar
chiptz chiptz is offline
 
Join Date: Jan 2005
Location: Portugal
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Thank you for your help! however maybe I was not clear, will this work without cmps installed?

I always get this:

Warning: require_once(./includes/vba_cmps_include_template.php) [function.require-once]: failed to open stream: No such file or directory in [path]/tab_blog.php on line 25

Fatal error: require_once() [function.require]: Failed opening required './includes/vba_cmps_include_template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/techzone/public_html/dev/forum/tab_blog.php on line 25
Reply With Quote
  #99  
Old 09-07-2008, 03:20 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chiptz View Post
Hi,

Thank you for your help! however maybe I was not clear, will this work without cmps installed?

I always get this:

Warning: require_once(./includes/vba_cmps_include_template.php) [function.require-once]: failed to open stream: No such file or directory in [path]/tab_blog.php on line 25

Fatal error: require_once() [function.require]: Failed opening required './includes/vba_cmps_include_template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/techzone/public_html/dev/forum/tab_blog.php on line 25
ya, forgot to mention that you simply strip that that out (the include at the top of each of those content files)...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09893 seconds
  • Memory Usage 2,511KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (12)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete