View Full Version : Add-On Releases - AJAX Tabs Content Script v2
bobster65
10-25-2007, 10:00 PM
AJAX Tabs Content Script - Version 2.0
Note: Altho this "How To" is written for implementation within vbadvanced CMPS, this can also be easily implemented anywhere within vB , ie on custom vB pages or within current vB pages.
Description/Whats changed within this release?: This new version (based on the AJAX Tabs Content Script (v 2.0) written by Dynamic Drive - http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm) is a versatile Ajax script that lets you display content pulled from external files inside a DIV and organized via CSS tabs. A fully unobtrusive, CSS and HTML based script, it supports practical features such as persistence of the active tab (ie: when page is reloaded), an "IFRAME" mode, a "slideshow" mode, ability to expand/contract arbitrary DIVs on the page at the same time, nested tabs, and much more. Below lists the features of this script that together make it highly adaptable in the real world:
Here's a quick outline of the script features:
Fetch and display an external page (from the same domain) inside a container when a tab is clicked on via Ajax.
(v 2.0) Apart from Ajax, an external page can also be fetched and displayed via the IFRAME element instead. This is useful for external pages that either contain JavaScript/ CSS code that doesn't run properly when fetched via Ajax, or the page is from an outside domain.
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 inline on the page and not fetched via Ajax, to avoid unnecessary fetching of external pages.
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.
(v 2.0) Supports auto "slideshow" mode, in which script automatically cycles through and selects each tab periodically until a tab is explicitly selected.
(v 2.0) Ability to also expand/contract arbitrary DIVs on the page as the tabbed content is expanded/ contracted.
(v 2.0) Ability to dynamically select a tab either based on its position within its peers, or its ID attribute.
(v 2.0) Ability to directly load a different external page into the content container, either via Ajax or IFRAME.
(v 2.0) Ability to set where the CSS class "selected" get assigned when a tab is clicked on- either on the tab link itself (its "a" element), or its parent instead (ie: "li" element). This makes the script adaptable to both CSS Tabs that are styled at the "A" level itself, or its parent container instead.
(v 2.0) Supports nested Ajax Tabs! In other words, you can have an external page fetched via Ajax contain in itself Ajax Tabs that show their own contents when clicked on as well. This is made possible using the "onajaxpageload" custom event handler (see documentation).
Supports multiple Ajax Tabs Contents on the same page.
Fully unobtrusive, search engine friendly design. For search engines or browsers with JavaScript disabled, the external contents will just load as actual pages (instead of via Ajax).
Reminder: Due to security limitations, the external pages loaded via each tab using Ajax must reside on the same domain as the script itself. This limitation doesn't apply if you use the "IFRAME" option to fetch and show the external page instead.
This is what I've done so far to implement AJAX Tabs functionality for my websites and others. 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 content is, check out the screen shots for a visual.
CMPS Version Note: Coded for CMPS v3.0. 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_Main, adv_portal_alt_module_wrapper (optional)
Files: ajaxtabs.js, ajaxtabs.css, Sample Content Files, images
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.
Use Attached Sample CSS file - Sample name: ajaxtabs.css
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.
Step 3. Create, Name and Upload Multiple "Content" files.
Use attached Sample PHP "Content" file - Sample name: tabexternal.php (I've included working samples in the attached Zip File).
NOTE: Please read the Instructions TXT File for the edits that need to be made in order for them to work on your site.
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: Further Modifications to these files can be made once you get the initial system up and running.
Step 4. (optional) Create an Alternative Module Wrapper Template.
Use attached Sample Alternative Module Wrapper Template - Sample name: adv_portal_alt_module_wrapper
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.
Step 5. Create a new Template.
Use attached sample Custom Template Sample name: adv_portal_Tab_Block_Main
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 sample template in the attached file, HOWEVER, there are some edits that you will need to make to the code based upon steps 1-3 above.
EDITS NEEDED TO THE ATTACHED SAMPLE 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.
<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 ajaxtabs.js file.
<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).
<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>
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 say "Congrats USERNAME! You have successfully added AJAX Tab Content to your Site."
CUSTOMIZATION
Style: Modify CSS File in Step 2 to match the Style of your site. The Sample CSS Files comes with 3 different styles of Tab Layouts. Choose the one that best suits your needs and further modify the CSS to match your sites Style(s)....
Tab Names: Modify Template created in Step 5 to change the NAME of the tabs themselves - ie.. from Tab 1 to Announcements (see below)
<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
echo '<table cellspacing="2" cellpadding="0" width=100%><tr> <td class="alt2"><span class="smallfont">Welcome Back To YOURSITENAMEHERE <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 <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)
Turning on "slideshow" mode
You can have the tabs within your Ajax Tabs Content automatically rotate every x seconds until a user explicitly clicks on a tab. To enable "slideshow" mode on your Tab Content, just pass in an integer when calling instance.init() to initialize your script: This is located at the bottom of the Template you created in step 5
<script type="text/javascript">
var mytabs=new ddajaxtabs("maintab", "ajaxcontentarea")
mytabs.setpersist(true)
mytabs.setselectedClassTarget("link") //"link" or "linkparent"
mytabs.init(15000)
</script>
</body>
</td></tr>
Notice the integer in red, which is in units of milliseconds. With one defined, the script will rotate through the tabs every x milliseconds (so 15000=15 seconds).
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.
<li><a href="http://www.domain.com/forums/CONTENT FILE" rel="ajaxcontentarea">TAB NAME</a></li>
Example:
<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.
Additional Enhancements
Please see post 2 of this thread for additional enhancements.
If you want to read up on AJAX Tabs, check out the Ajax Tabs Content script over at Dynamic Drive (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/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 Content. 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 "Slideshow" Mode
The 2nd is an example of some dynamic content based on the user.
The 3rd is an example of modified recentthreads.php used within a tab.
The 4th is an example of using modified vbarticles within a tab.
The 5th is an examples of custom dynamic content within a tab.
bobster65
10-26-2007, 05:59 PM
Additional Enhancements
** Coming Soon ** (Adding on the fly lol)
Different Tab Layout Styles
The attached CSS file contains CSS for 3 different layout styles. To change the inverted style that is preset with the sample, edit the adv_portal_TAB_BLOCK_MAIN template (or what ever you named it) to one of the below samples.. both samples below have the tabs on the top.
This layout is for the shadetabs CSS
<ul id="tabs" class="shadetabs">
<li><a href="tabexternal.php" rel="tabcontainer" class="selected">Tab 1</a></li>
<li><a href="tabexternal2.php" rel="tabcontainer">Tab 2</a></li>
<li><a href="tabexternal3.php" rel="tabcontainer">Tab 3</a></li>
<li><a href="tabexternal4.php" rel="tabcontainer">Tab 4</a></li>
</ul>
<div id="divcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
</div>
<script type="text/javascript">
var mytabs=new ddajaxtabs("tabs", "divcontainer")
mytabs.setpersist(true)
mytabs.setselectedClassTarget("link") //"link" or "linkparent"
mytabs.init()
</script>
This layout is for the indentmenu CSS
<div id="tabs" class="indentmenu">
<ul>
<li><a href="tabexternal.php" rel="tabcontainer" class="selected">Tab 1</a></li>
<li><a href="tabexternal2.php" rel="tabcontainer">Tab 2</a></li>
<li><a href="tabexternal3.php" rel="tabcontainer">Tab 3</a></li>
<li><a href="tabexternal4.php" rel="tabcontainer">Tab 4</a></li>
</ul>
<br style="clear: left" />
</div>
<div id="divcontainer" style="border:1px solid gray; width:550px; height: 150px; padding: 5px; margin-bottom:1em">
</div>
<script type="text/javascript">
var mytabs=new ddajaxtabs("tabs", "divcontainer")
mytabs.setpersist(false)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
Dynamically selecting a tab anywhere on your page
After your Ajax Tab script is initialized and displayed, you can dynamically select any of its tabs either based the tab's position relative to its peers, or its ID attribute (you have to assign it one first). The method to call is the following:
instance.expandit(tabid_or_position)
The parameter entered should either a string representing the tab link's ID attribute (you need to first assign one to that tab), or an integer corresponding to that tab's position relative to its peers, to select. For the later, the counting starts at 0 (ie: 0=1st tab). For example:
<p><a href="javascript: countries.expandit(2)">Select 3rd Tab</a></p>
<p><a href="javascript: countries.expandit('favorite')">Select Tab with ID "favorite"</a></p>
Dynamically loading an external page using Ajax
You can dynamically load an external page into the Ajax Tabs content container via Ajax, such as by using a link on the page. It's done with the below method:
instance.loadajaxpage(pageurl)
"pageurl" should be the full URL or path to the external file on your server. You cannot use this method to load a page from an outside domain, due to Ajax domain restrictions:
<p><a href="javascript: countries.loadajaxpage('external5.htm')">Load "external5.htm" into content container via Ajax</a></p>
<p><a href="javascript: countries.loadajaxpage('http://www.mysite.com/content/external5.htm')">Load into "external5.htm" content container via Ajax</a></p>
The selected tab in this case doesn't change when you load a new page directly into the content container using this method.
Dynamically loading an external page using IFRAME
You can also load an external page into the Ajax Tabs content container via IFRAME. What this does is erase whatever previous content was inside the content container, add an IFRAME tag into it, and load the desired page into the IFRAME:
instance.loadiframepage(pageurl)
"pageurl" should be the full URL or path to the external file on your server or beyond. Since the external page is loaded via IFRAME, the page can be either from your domain or outside as well (ie: http://www.google.com):
<p><a href="javascript: countries.loadiframepage('external5.htm')">Load "external5.htm" into content container via IFRAME</a></p>
<p><a href="javascript: countries.loadiframepage('http://www.google.com')">Load Google Homepage into content container via IFRAME</a></p>
In case you're wondering, the IFRAME tag that's added to the content container always carries the CSS class name "tabcontentiframe" and a name attribute of "_ddajaxtabsiframe-contentdivid", where "contentdivid" is the ID of the content container (ie: "countrydivcontainer"). You can further use this information to either style the IFRAME using CSS, or manipulate it somehow by directly accessing it via its name attribute.
Nesting Tabs..
It's possible to have nested Ajax Tabs. That is to say, the external page fetched by one of the tabs can in itself contain a new Ajax Tabs Content instance that loads other content when clicked on. The key is to enlist the help of the custom event handler "instance.onajaxpageload" on your main page to initialize the tabs that are on the external page.
Main Tab Template:
<ul id="countrytabs" class="shadetabs">
<li><a href="external1.htm" rel="countrycontainer" class="selected">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
<li><a href="externalnested.htm" rel="countrycontainer">Tab 3</a></li>
</ul>
<div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
</div>
<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
countries.onajaxpageload=function(pageurl){
if (pageurl.indexOf("externalnested.htm")!=-1){
var provinces=new ddajaxtabs("provincetabs", "provincedivcontainer")
provinces.setpersist(true)
provinces.setselectedClassTarget("link") //"link" or "linkparent"
provinces.init()
}
}
</script>
Nested Template:
<ul id="provincetabs" class="shadetabs">
<li><a href="external1.htm" rel="provincedivcontainer">Tab 1</a></li>
<li><a href="external2.htm" rel="provincedivcontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="provincedivcontainer">Tab 3</a></li>
</ul>
<div id="provincedivcontainer" style="padding: 10px; border-top: 1px solid gray;">
</div>
Notice the code in red- this is code that originally should appear inside "nested template", but since the tabs in question are on an external page and being called dynamically via Ajax as nested tabs, the code to invoke it needs to be moved to the main page instead and called via the "onajaxpageload" event handler. This event handler basically fires whenever a tab fetching Ajax content has completed loading the external page in question:
instance.onajaxpageload=function(pageurl){
//if (pageurl=="href_attribute_value_of_tab"){
//run custom code
}
Use the parameter "pageurl" to determine which tab exactly is being clicked on based on its href attribute value, and only fire your custom code for the correct tab. In this case, since I only want to call my custom code to initialize the nested tabs when the 3rd tab is clicked on, I'm testing for:
if (pageurl.indexOf("externalnested.htm")!=-1){
"
"
}
here, or the "href" attribute of the 3rd tab.
Use the above technique to set up nested tabs whenever the nested tabs are contained in an external page and fetched via the Ajax option. If the external page is fetched via IFRAME, the above will not work and is unnecessary anyhow, as the nested tab's invocation code should simply appear within the external page itself.
bobster65
10-26-2007, 06:00 PM
Enhanced Recent Threads Layout
See this post - >> https://vborg.vbsupport.ru/showpost.php?p=1372875&postcount=29
** ADDITIONAL CONTENT FILES **
This Post will be used to identify member submitted content files and enhancements as well as additional content files that I release.
Attached to this Post:
**UPDATED** RECENT THREADS 09-01-2008 - tabrecentthreadsexp2.php - This file includes Post ICON Column and the ability to set a specific Thread Title Character cut off amount. The UPDATE includes both database thread marking and cookie based thread marking. Various settings at the top of the file make install/Setup a breeze.
**UPDATED** RECENT THREADs with THUMBNAIL 09-01-2008 - tabthumbs.php - This file is the same as tabrecentthreadsexp2.php with the addition of displaying a thumbnail in place of the post ICON if there is a image attached to the first post. You can see an example of this @ www.veggieblogs.com specifically the RECIPES or Cookbooks Tabs. The UPDATE includes both database thread marking and cookie based thread marking. Various settings at the top of the file make install/Setup a breeze.
NEW vB Blogs 02-07-2008 - tab_blog.php - This content file is for use with vbulletins blog system. It is a BASIC recent blogs layout. The File contains 2 Layout Styles (Wide and Small). Wide is the default. To use small (for skinny Tab Layouts) remark out the 2 Wide Layout Areas and uncomment out the 2 ALT Layout Areas. Both display Title, Name, Data and Views.
NEW vBa Links 02-08-2008 - tab_latestlinks.php & tab_latestlinksexp.php - These 2 files are for displaying data from vba links directory (you must have vba links installed for this to work)
Member Submitted Enhancements:
Date - Attachment name - Description - Member Name
NEW GARS 02-07-2008 - https://vborg.vbsupport.ru/showpost.php?p=1438553&postcount=113 - GARS Content File - ZiG
What to make your own?
Here is an example of how I replicate the User CP CMPS Block in a Tab
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tabwelcome'); // 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('TEST');
// 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');
require_once('./includes/functions_user.php');
require_once('./includes/functions_reputation.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
?>
<?php
//Get Avatar
$avatarurl = fetch_avatar_url($vbulletin->userinfo['userid']);
if ($avatarurl[0])
{
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
else
{
$avatarurl = "/forums/images/misc/noavatar.gif"; // ADD PATH TO THE LOCATION OF YOUR NO AVATAR image
}
//Get Rep Images
fetch_reputation_image($vbulletin->userinfo, $permissions);
//Get Rep Power
$reppower = vb_number_format(fetch_reppower($vbulletin->userinfo, $permissions));
//Get Rank Image
$vbulletin->userinfo['rank'] = str_replace('src="', 'src="' . $vbulletin->options['bburl'] . '/', $vbulletin->userinfo['rank']);
// New posts
if (strlen($vbulletin->session->vars['newposts']) > 0 AND !$vbulletin->options['threadmarking'])
{
$newposts = number_format($vbulletin->session->vars['newposts']);
}
else
{
$getnewposts = $db->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "post AS post
" . iif($vbulletin->options['threadmarking'],
'LEFT JOIN ' . TABLE_PREFIX . 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' . $vbulletin->userinfo['userid'] . ')') . "
WHERE dateline >= " . $vbulletin->userinfo['lastvisit'] .
iif($vbulletin->options['threadmarking'],
' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)') . "
AND visible = 1
");
if (!$vbulletin->options['threadmarking'])
{
$db->query_write("UPDATE " . TABLE_PREFIX . "session SET newposts = '$getnewposts[count]' WHERE userid = " . $vbulletin->userinfo['userid']);
}
$newposts = vb_number_format($getnewposts['count']);
}
//Get PM Quota, PM Total and PM Unread
$permissions['pmquota'] = vb_number_format($permissions['pmquota']);
$vbulletin->userinfo['pmtotal'] = vb_number_format($vbulletin->userinfo['pmtotal']);
$vbulletin->userinfo['pmunread'] = vb_number_format($vbulletin->userinfo['pmunread']);
//Echo Content into Tab Div
echo '<table border="0" cellpadding="6" cellspacing="1" class="tborder" width=100%>';
echo '<tr> <td class="alt1"><a href="/forums/profile.php?do=editavatar"><img src="'. $avatarurl . '" border="0" alt="Edit Avatar" /></a> </td> <td class="alt2" valign="top" width="100%"> <div class="smallfont" style="float:'. $stylevar[right] . '">Rep Power: ' . $reppower . ' <div align="' . $stylevar[right] . '" style="padding-bottom:' . $stylevar[cellpadding] .'px">' . $vbulletin->userinfo['reputationdisplay'] . '</div> <div align="' . $stylevar[right] . '" style="padding-top:' . $stylevar[cellpadding] . 'px; padding-bottom:' . $stylevar[cellpadding] . 'px">' . $vbulletin->userinfo['rank'] . '</div> </div> <span class="smallfont"> Welcome back <b>' . $vbulletin->userinfo['username'] . '</b><br /> You last visited: ' . $vbulletin->userinfo['lastvisitdate'] . '<br /> <a href="/forums/search.php?do=getnew">New Posts</a>: ' . $newposts . '<br /> <a href="/forums/login.php?' . $session[sessionurl] . 'do=logout&logouthash=' . $vbulletin->userinfo['logouthash'] . '">Log Out</a> </span></td></tr>';
// Echo Private Message portion of the User CP Block
echo '<tr> <td class="thead" colspan="2"><a href="/forums/private.php">Private Messages</a></td></tr>';
echo '<tr> <td class="alt1" colspan="2"><span class="smallfont">' . $vbulletin->userinfo['pmunread'] . ' New PMs. You have ' . $vbulletin->userinfo['pmtotal'] . ' total out of ' . $permissions['pmquota'] . ' allowed.</span></td></tr>';
// End Private Message portion of the User CP Block
echo "</table>";
// The below can be removed if you don't want the Horizontal Rule and additional space for adding some custom text/sitemessage/other code..
echo "<hr>";
echo '<table cellspacing="2" cellpadding="0" width=100%>';
echo '<tr> <td class="smallfont">THIS IS WHERE YOU CAN ADD A SITE MESSEAGE OR WHAT EVER... YOU CAN ALSO JUST GET RID OF IT AS WELL. SIMPLY COMMENT OUT OR REMOVE LINE 109 THRU 115... </td></tr>';
echo'</table>';
// End additional Comment area...
?>
...
CrossBones
10-26-2007, 06:44 PM
OMG, this is totally RAD...***INSTALLED***
Nice job bobster! :up:
::walk awzy in amazement::
FreshFroot
10-26-2007, 07:34 PM
Just amazing.. I wanted to do something like this too. Glad someone else got it done :D
I vote MOTM!
Strike3ForumsMH
10-26-2007, 08:53 PM
Looks great, I am going to have to try this out one of these days.
bobster65
10-26-2007, 08:59 PM
Looks great, I am going to have to try this out one of these days.
Hey Mission... I'll hook ya up Bro ;)
RZ
Endurer
10-26-2007, 11:54 PM
Wow, sweet. Definitely installed.
Hornstar
10-26-2007, 11:57 PM
Very nice work, I will be keeping this in mind that is for sure.
rapidphim
10-27-2007, 05:53 AM
I got this error
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/vba_cmps_include_template.php on line 47
Congrats Admin!
You have successfully added AJAX Tab Content to your Site.
how to fix it, please!
TheMilkCarton
10-27-2007, 07:05 AM
I'm confused... I just downloaded a "non-enhanced" version a few days ago over at vBadvanced...
So what has changed since then? Everything denoted with "v2.0"? I was under the impression that Nested Tabs worked on the version I downloaded.
TheMilkCarton
10-27-2007, 07:07 AM
I got this error
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/vba_cmps_include_template.php on line 47
Congrats Admin!
You have successfully added AJAX Tab Content to your Site.
how to fix it, please!
Just delete the references to that file in all the tabexternal*.PHP files.
This was talked about over at vBadvanced, I suggest anyone with problems go read the several pages about this mod over there. :)
projectego
10-27-2007, 11:35 AM
* projectego clicks install :D
bobster65
10-27-2007, 01:22 PM
I'm confused... I just downloaded a "non-enhanced" version a few days ago over at vBadvanced...
So what has changed since then? Everything denoted with "v2.0"? I was under the impression that Nested Tabs worked on the version I downloaded.
Yes, everything denoted with (v2.0) is new in this version. Nested tabs were possible, but there were some issues in order to get them to work. Nested tabs function a lot different (and better) with the newer version.
bobster65
10-27-2007, 01:42 PM
Added the steps to achieve different layout styles... they are located at the beginning of the 2nd post.
BozzaJos
10-27-2007, 03:02 PM
Wow lol, this looks like one amazing mod for any vBAdvanced using site! Well done creating this mate. It looks really hard to install unfortunately. I have no knowledge whatsoever about php or vBulletin but I managed to installed tons of other mod. Will this be harder than other mods to install?
Something else, I do like live demo's. The screenshots do say a lot but the real thing always gives a clearer picture. Do you have a site for me to check out which has this mod installed? Or perhaps someone else who reads this and has it installed can give me a quick peak hehe?
Thanks in advance. Like I say, awesome mod!
rapidphim
10-28-2007, 03:34 AM
this hack looks complicate and confuse but once you install, it's freaking easy and turned out really nice and worth the hack.
BBI-Ross
10-28-2007, 03:03 PM
Hi,
Looks great :D
How do you achieve screen shot 3 (The 3rd is an example of modified recentthreads.php used within a tab)?
Cheers,
Ross
anarx
10-28-2007, 04:56 PM
very nice mod !!! installed ...
bobster65
10-29-2007, 09:06 PM
Wow lol, this looks like one amazing mod for any vBAdvanced using site! Well done creating this mate. It looks really hard to install unfortunately. I have no knowledge whatsoever about php or vBulletin but I managed to installed tons of other mod. Will this be harder than other mods to install?
Something else, I do like live demo's. The screenshots do say a lot but the real thing always gives a clearer picture. Do you have a site for me to check out which has this mod installed? Or perhaps someone else who reads this and has it installed can give me a quick peak hehe?
Thanks in advance. Like I say, awesome mod!
No, this is easy to install and use. Custom Content for each tab is where things might get difficult for you tho. Hopefully, members will share custom content files with the community that you will be able to download and use in conjunction with this interface. I've attached a basic recent threads content which can be modified. I will be releasing some content addons soon... ie, recent threads with different layouts.. news with different layouts and functionality.
Hi,
Looks great :D
How do you achieve screen shot 3 (The 3rd is an example of modified recentthreads.php used within a tab)?
Cheers,
Ross
the 3rd screen shot uses the same content php files that I attached with some additional lines of code. I will be releasing a recent threads add on soon with multiple layout options to choose from. Same thing with news.
D|ver
10-30-2007, 08:23 AM
Really awesome mod :)
I am also really not familiar with php and have a question:
Is it possible to use the php files within the modules folder of vba cmps without modification?
Or does every cmps module need a customisation for using it?
Sorry for this beginner question.
bobster65
10-30-2007, 02:07 PM
Really awesome mod :)
I am also really not familiar with php and have a question:
Is it possible to use the php files within the modules folder of vba cmps without modification?
Or does every cmps module need a customisation for using it?
Sorry for this beginner question.
No, you can not simply point to one of the php files in the modules folder. You can copy those files and the modify them tho. If you are not familiar with php tho, it could be somewhat of a challenge. Hopefully, members of the community will share their Custom Content files with everyone :) I will have a few more custom content files for use soon.
DragonMasterNYC
10-30-2007, 04:16 PM
This is the thread I've been looking for. Thanks for the mod and the help.
Dragon
cygy2k
10-31-2007, 12:43 PM
Any news on when to expect the recent threads enhancement? Thanks for the most amazing mod!
cygy2k
10-31-2007, 02:52 PM
Problem:
I have vbSEO installed and I'm getting the archive page numbers on the bottom of the tabs content module (along with at the normal bottom of page location).
bobster65
10-31-2007, 03:00 PM
Any news on when to expect the recent threads enhancement? Thanks for the most amazing mod!
Sometime today....
bobster65
10-31-2007, 03:05 PM
Problem:
I have vbSEO installed and I'm getting the archive page numbers on the bottom of the tabs content module (along with at the normal bottom of page location).
hmmmmm I don't have or use vbSEO, so I don't know why it would be doing that. I'll take a look and see if there is something in the content file that isn't needed and strip it out.
cygy2k
10-31-2007, 04:38 PM
Thank you so much, this is such a fantastic mod!
bobster65
10-31-2007, 04:42 PM
Any news on when to expect the recent threads enhancement? Thanks for the most amazing mod!
Download the attachment within this post and see if its more along the lines of what you are looking for. You will need to make some simple edits to the file before you can use it tho...
Line 81. This is where you put the forumID's that you wish to pull recent threads from. In this example, I have it set to pull from 5 seperate forums. Just change the ID numbers to match the forums on your site that you wish to pull from. If you want less than 5, remove one of the or statements.. if you wish to pull from more, add another or statement.
Line 83. This is where you set the limit on the amount of threads to show. Its set at 15, change this to what ever you like.
Line 210. This is the visual output. Simply change all the paths in this block to match your site. The defaults in the example are all www.domain.com/forum
NOTE: This will produce an output similar to the 3rd screen shot.
cygy2k
10-31-2007, 05:24 PM
That is great! Is there a way to have it still show bold for unread threads, a down arrow to go to most recent unread post, etc? Sorry for sounding like a pest:)
Also - when I try to just add text to your example tabexternal.php file where the echo part is at the bottom, I always get an error message saying that a ' or ; was expected on line 46. I must not be following some sort of coding pattern I guess.
cygy2k
10-31-2007, 05:25 PM
Also, I just disabled the archive links for vbSEO for now and that solved that problem.
bobster65
10-31-2007, 05:36 PM
That is great! Is there a way to have it still show bold for unread threads, a down arrow to go to most recent unread post, etc? Sorry for sounding like a pest:)
Also - when I try to just add text to your example tabexternal.php file where the echo part is at the bottom, I always get an error message saying that a ' or ; was expected on line 46. I must not be following some sort of coding pattern I guess.
Ya, I'm working on the thread marking right now (That will include going to the most recent post)... and yer not a pest :eek: lol
as far as adding text, make sure you \ out and ' in your text..
kennethj
11-08-2007, 08:32 AM
couple of request for this - now its' here for those who need it, wish to use it .
these are just edits - thanks to the author of the mod ;)
edits for AJAX Tabs Content Script v2 - vBulletin.org Forum (https://vborg.vbsupport.ru/showthread.php?t=161197)
i use this for admin only right now -- so no demo , just images of what i see .
i am NOT a coder by no means - just figured it out for myself and .. .
am certainly no writer either .. .
in the template(s) provided from this mod :
adding more information to the new posts:
this uses all of the information i needed -
to remove unneeded fields both the sections must be edited.
the first from <td to </td for the top section (lables) and the second section (what it displays for each one), the entire line : echo '<td to /td>';
find:
echo '<table cellspacing="2" cellpadding="0" width=100%><tr> <td class="thead">Title - Date</td></tr>';
replace with :
echo '<table class="tborder" cellspacing="1" cellpadding="1" width="100%"><tr align="center"><td class="thead" width="48%" align="left">Title / Started by</td><td class="thead" width="28%">LastPost</td><td class="thead" width="4%">Replies</td><td class="thead" width="4%" nowrap="nowrap"> Views </td><td class="thead" width="20%" align="left">Forum</td></tr>';
find:
// echo BR;
echo '<tr> <td class="alt1" class="smallfont">» <a href="http://www.DOMAIN.COM/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a> <br><span class="smallfont"> ' . $thread[postdate] . ' ' . $thread[posttime] . '</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>";
replace with :
// echo BR;
echo '<tr>';
echo '<td class="alt1 smallfont">» <a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a><div style="font-size:10px"> ' . $thread[postusername] . '</div></td>';
echo '<td class="alt1 smallfont" align="right">' . $thread[lastpostdate] . ' <span class="time">' . $thread[lastposttime] . ' </span><div> <span style="font-size:10px">by ' . $thread[lastposter] . ' <a href="/forums/showthread.php?p=' . $thread[lastpostid] . '#post' . $thread[lastpostid] . '"></span><strong>»</strong></a> </div></td>';
echo '<td class="alt2 smallfont" align="center">' . $thread[replycount] . '</td>';
echo '<td class="alt2 smallfont" align="center">' . $thread[views] . '</td>';
echo '<td class="alt1 smallfont"> <a href="/forums/forumdisplay.php?f=' . $thread[forumid] . '">' . $thread[forumtitle] . '</a></td>';
}
}
$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 "</tr></table>";
the arrow on the last post takes you to the last post.
dont' forget to change the path to your forum : is at /forums now.
to trim the thread titles to a desired length:
find : near the top :
// ################################################## #####################
?>
<?php
add the 2 varables or replace the section with :
// ################################################## #####################
$portal_threads_maxchars = '33';
$portal_threads_maxwordchars = '15';
?>
<?php
find :
// 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;
}
}
}
}
replace with :
// Trim title
if (strlen($thread['title']) > $portal_threads_maxchars AND $portal_threads_maxchars)
{
$thread['title'] = fetch_trimmed_title($thread['title'], $portal_threads_maxchars);
}
// Check for long words that may stretch the page
if ($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) > $portal_threads_maxwordchars)
{
$word = fetch_trimmed_title($word, $portal_threads_maxwordchars);
$thread['titletrimmed'] = true;
}
if ($thread['title'])
{
$thread['title'] .= ' ';
}
$thread['title'] .= $word;
}
}
}
}
are the same 2 settings as in the vBa CP.
$portal_threads_maxchars is for how many charters are displayed.
$portal_threads_maxwordchars is for how long words are.
change the 33 and 15 to your needs.
an attempt
thread marking for new: this works DIFFERENTLY than expected - how it should!
if it was in templates it may work correctly - for me it works untill i learn how to change things.
posts will show new untill you mark the forums read manualy - there may be other conditions, its' a start.
NO i can NOT change how this is working now or how it functions!!!
am using what i thought may work and .. . it dont'.
find:
echo '<td class="alt1 smallfont">» <a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a><div style="font-size:10px"> ' . $thread[postusername] . '</div></td>';
replace with:
if ($show['gotonewpost'])
{
echo '<td class="alt1 smallfont"><a href="/forums/showthread.php?t=' . $thread[threadid] . '&goto=newpost">∇</a> <a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '"><strong>' . $thread[title] . '</strong></a><div style="font-size:10px"> ' . $thread[postusername] . '</div></td>';
}
else
{
echo '<td class="alt1 smallfont">» <a href="/forums/showthread.php?t=' . $thread[threadid] . '"title="' . $thread[preview] . '">' . $thread[title] . '</a><div style="font-size:10px"> ' . $thread[postusername] . '</div></td>';
}
clicking the arrow will take you to the first new post.
OMG this is probabily the greates thing i've seen :O
I'll check it out propely when I have the time, but if it works as promised (and looks like it does) then it will be a great great GREAT improvement for my forums :)
so many options and possibilities to explore :O
bobster65
11-08-2007, 01:17 PM
couple of request for this - now its' here for those who need it, wish to use it .
these are just edits - thanks to the author of the mod ;)
Outstanding Kenneth :up: Thank you for the enhancements. There are a few member enhancements over at vbadvanced as well (for those of you that are interested)..
Please remember, if you are interested in enhancing or writing content addons, feel free to do so..
rapidphim
11-08-2007, 07:30 PM
For whoever want to see what Ken just provided above, in LIVE, please visit here http://www.vshares.net
TheMilkCarton
11-09-2007, 12:48 AM
Kenneth,
Go over to vBadvanced to check out how to REALLY integrate Thread Read Marking. :) I got it working fine for real, no having to mark forums read manually.
I also integrated forum permissions just fine, with the help of Brian over at vBadvanced. I just use the code built into vBa to apply perms.
i use a GARs vBA CMPS module to show the 5-10 latest stories from my GARs article forum on the front page. it would be great to use this script to have the different article categories tabbed for visitors to switch through. i dont know php well enough to put that together myself though
having the ability to directly link to the php module files would be great too, even though i realize that is probably much more difficult to code
i was hoping to just be able to put something like
include('/home/blah/whatever.php');
in the tab files would work, but unfortunately it doesn't seem like you can do that and you actually have to put together the code. im not that great at doing that, so i hope someone creates a GARs one.
very nice script anyway
Damn this thing is great :) been playing with it for he last day or so. It's so damn great in every aspect :)
I got one problem, I don't seem to be able to use $thread[preview] code :( I use it but returns and empty result where it should give a preview of the threads content :(
<a href=... title="' . $thread[preview] . '"
if anyone can help me wioth that it would be great ^^
Note: I'm using kenmeth's enhancement
turkforum
11-23-2007, 07:53 AM
First of all, Thank you bobster65 for this mod.. :)
My issue is kind a strange one..For that reason I want to give more detail about it..
1.I had downloaded your recentthread file and specify the forums where it will calls last threads from..
This file: https://vborg.vbsupport.ru/showpost.php?p=1372875&postcount=29
2.Setup templates for ajax..
At the end, It is working on firefox browser but not internet explorer..On IE, it just keeps saying "content is loading"..
Same ajax system that not calling those php files but html files working on IE (tabs with images on the top-right side)..These means ajax is working properly to my poor coding knowledge..:)
On other hand, when I type link URL of that php file to IE addres bar, it loads..Then I decide I know nothing about coding..:D
For those reasons, I am completely lost here..
Please help me out.. :)
http://www.turkforum.net/pasali.php?pageid=turkforum
+
I had mentioned same issue on previous version thread but I had no luck..
valdet
11-23-2007, 09:34 AM
This is such a great addition to navigation.
In order to spice it up even more, can someone guide us through how to make these tabs show different forum categories.
Example: http://www.namepros.com
Regards.
bobster65
11-23-2007, 03:21 PM
This is such a great addition to navigation.
In order to spice it up even more, can someone guide us through how to make these tabs show different forum categories.
Example: http://www.namepros.com
Regards.
I just coded that (what namepros did) for another member last week ( BBWForums.net ) check out his site and see if its what you are after..
Bob
bobster65
11-23-2007, 03:37 PM
Damn this thing is great :) been playing with it for he last day or so. It's so damn great in every aspect :)
I got one problem, I don't seem to be able to use $thread[preview] code :( I use it but returns and empty result where it should give a preview of the threads content :(
<a href=... title="' . $thread[preview] . '"
if anyone can help me wioth that it would be great ^^
Note: I'm using kenmeth's enhancement
make sure in the query string that post.pagetext AS preview is part of it...
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, post.pagetext AS preview
glorify
11-23-2007, 11:39 PM
Wanted to stop here, click install, thank bob, and share the threadsexternal I am using to this point.
I've attached screens of both of my styles as well. Very stock vba looking. You can peek at my demo (http://www.glorifythepast.com/) if you want.
bobster65
11-24-2007, 12:28 PM
Wanted to stop here, click install, thank bob, and share the threadsexternal I am using to this point.
I've attached screens of both of my styles as well. You can peek at my demo (http://www.glorifythepast.com/) if you want.
Turned out awesome Bud! You have one of the nicest vb sites period!
glorify
11-25-2007, 02:02 PM
Thanks man. And anyone who gives this mod less tha 5 stars needs to have their head checked ;)
glorify
11-25-2007, 07:55 PM
For anyone that likes the default vb look of your table header, here is the way I did it.
Step 1:
Keep a back up of your adv_portal_Tab_Block_Main template, and ajaxtabs.css
Step 2:
https://vborg.vbsupport.ru/attachment.php?attachmentid=72636&d=1195957216
https://vborg.vbsupport.ru/attachment.php?attachmentid=72637&d=1195957216
Figure out the way you want the header to look. In the first image, I used the default gradient_tcat and gradient_thead gifs. In the second I used the standard gradient_tcat gif, then turned it upside down and renamed it to gradient_thead.gif. Figure out what you want, then upload the two images to your ajaxtabs folder.
Step 3:
Here is my adv_portal_Tab_Block_Main. The red is what you HAVE to change, the blue matches my css, but if you change the width anywhere, you'll have to edit it.
<tr><td>
<head>
<link rel="stylesheet" type="text/css" href="http://www.XXXX.com/forums/ajaxtabs/ajaxtabs.css" />
<script type="text/javascript" src="http://www.XXXX.com/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
***********************************************/
* 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>
<div id="tabs" class="indentmenu">
<ul>
<li><a href="http://www.XXXX.com/forums/tabexternal.php" rel="tabcontainer" class="selected"><strong>» Tab1</strong></a></li>
<li><a href="http://www.XXXX.com/forums/tabexternal2.php" rel="tabcontainer"><strong>» Tab2</strong></a></li>
<li><a href="http://www.XXXX.com/forums/tabexternal3.php" rel="tabcontainer"><strong>» Tab3</strong></a></li>
<li><a href="http://www.XXXX.com/forums/tabexternal4.php" rel="tabcontainer"><strong>» Tab4</strong></a></li>
</ul>
<br style="clear: left" />
</div>
<div id="divcontainer" style="border:1px solid #003366; border-top: none; width:99.75%; height: 573px; margin-bottom:1em">
</div>
<script type="text/javascript">
var mytabs=new ddajaxtabs("tabs", "divcontainer")
mytabs.setpersist(false)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
</body>
</td></tr>
Step 4:
Next up is the indented portion of my css. Replace the Indented portion of your ajaxtabs.css with the edited AFTER YOUR CHANGES below.
The red are the values to change to match your site. The blue are optional width, that if you change you HAVE to change to match in your adv_portal_Tab_Block_Main template. I have put comments in green so it's easy to know where you can find these settings in your admincp to match your site (because I hate trying to figure out css).
/* ######### CSS for Indented CSS Tabs. Remove if not using ######### */
.indentmenu{
font: 10px Arial;
width: 100%;
}
.indentmenu ul{
margin: 0;
padding: 0;
float: left;
width: 99.75%; /*used in conjunction with width variable in adv_portal_Tab_Block_Main*/
border: 1px solid #003366; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Table Border: Background of your table*/
border-bottom: none;
background: #05173D; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Page Background: Background of your table*/
}
.indentmenu ul li{
display: inline;
}
.indentmenu ul li a{
float: left;
color: #ffcc00; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
padding: 2px 13px; /*Edit the 13px if you want to pad the cells wider or slimmer*/
font-size: 8pt;
padding-top: 6px; /*shift text down 1px*/
padding-bottom: 6px;
text-decoration: none;
background: #003366 url(http://www.XXXX.com/forums/ajaxtabs/gradient_tcat.gif) repeat-x top left; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Background Color and Image Name of your Category Strips*/
}
.indentmenu ul li a:visited{
color: #ffcc00; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
}
.indentmenu ul li a:hover{
color: #ffcc00 !important; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
padding-top: 7px; /*shift text down 1px*/
padding-bottom: 5px;
background: #05173D url(http://www.XXXX.com/forums/ajaxtabs/gradient_thead.gif) repeat-x top left; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Table Header: Background Color and Image Name of your Table Header*/
}
.indentmenu ul li a.selected{
color: #ffcc00 !important; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Category Strips: Font Color of your Category Strips*/
padding-top: 7px; /*shift text down 1px*/
padding-bottom: 5px;
background: #05173D url(http://www.XXXX.com/forums/ajaxtabs/gradient_thead.gif) repeat-x top left; /*AdminCP=>Styles & Templates=>Style Manager=>All Style Options=>Table Header: Background Color and Image Name of your Table Header*/
Step 5 (Optional if using for recent threads):
Use the tabexternal attached.
bobster65
11-25-2007, 08:00 PM
Cool, Thanks for Sharing Bud :) btw, my Raiders beat the chiefs @ arrowhead :)
glorify
11-25-2007, 08:51 PM
I see that. Thanks for taking care of our light work ;)
valdet
11-26-2007, 07:09 AM
I just coded that (what namepros did) for another member last week ( BBWForums.net ) check out his site and see if its what you are after..
Bob
Bobster, that is exactly what I am interested in achieving. Mind that I don't have vBAdvanced, so this should work for forum only.
Thanks for your time and I look forward to your reply.
Best regards,
Val.
DarthCoder
11-26-2007, 12:18 PM
thanks nice
bobster65
11-26-2007, 12:54 PM
Bobster, that is exactly what I am interested in achieving. Mind that I don't have vBAdvanced, so this should work for forum only.
Thanks for your time and I look forward to your reply.
Best regards,
Val.
Yes, what we are both talking about has nothing to do with this mod... its totally different, not even close to the same setup ... Shoot me a PM with a link to your site and what you are interested in breaking out (forum wise)... more styles=more time as each template MIGHT have to be done a little different (not always the case).. anyway, shoot me a PM to discuss outside of this Mod...
thanks Bob
Thx glorify the code works like a charm ^^
Does anyone know how could i sort the "news" in descending order? As in newest threads first? It is rather unpredictable to have it sorted out by latests post :( ^^
Thx guys
PS here is a my version demo (http://www.elrincondelmanga.com/) (spanish I know) it's only a beta till I get everything I want it to have on the final release ^^
Love this thing :P looks so slick and profesional ^^
bobster65
11-27-2007, 01:40 PM
Does anyone know how could i sort the "news" in descending order? As in newest threads first? It is rather unpredictable to have it sorted out by latests post :( ^^
PS here is a my version demo (http://www.elrincondelmanga.com/) (spanish I know) it's only a beta till I get everything I want it to have on the final release ^^
Love this thing :P looks so slick and profesional ^^
instead of ordering by 'lastpost' use 'thread.dateline' the sort order is already defaulted at descending..
Looks great on your site so far.. can't wait to see the final product :cool:
glorify
11-27-2007, 02:58 PM
Thx glorify the code works like a charm ^^
Great :)
Mr. Boo
11-27-2007, 10:42 PM
This is awesome, im having a little trouble and was wondering if anyone could help. I have set everything up and when i click on one of teh tabs it opens up a new window with the tabbed content and the original page dosnt update. When i load the page i always get the "congrats ajax is working correct" thing popup instead of the default tab. Have i missed something?
bobster65
11-27-2007, 10:54 PM
This is awesome, im having a little trouble and was wondering if anyone could help. I have set everything up and when i click on one of teh tabs it opens up a new window with the tabbed content and the original page dosnt update. When i load the page i always get the "congrats ajax is working correct" thing popup instead of the default tab. Have i missed something?
Double check all the steps again. The last time I saw this, the member didn't do the CSS step correctly.
Mr. Boo
11-27-2007, 11:10 PM
Thanks for the speedy reply. I think I have checked all the css steps... double checked the path to the css file and deleted the css code for the other layout styles. I can only see one change to make in the actual css file to the shade.gif etc
bobster65
11-27-2007, 11:23 PM
Thanks for the speedy reply. I think I have checked all the css steps... double checked the path to the css file and deleted the css code for the other layout styles. I can only see one change to make in the actual css file to the shade.gif etc
Do you have a link to the site so I can check it out? The only thing that comes to mind is that the path to the CSS file within the Template is wrong (That will cause problems like you are describing as well)...
Mr. Boo
11-27-2007, 11:30 PM
Do you have a link to the site so I can check it out? The only thing that comes to mind is that the path to the CSS file within the Template is wrong (That will cause problems like you are describing as well)...
I got it thanks, I had the old tabs_block_main template. Changed that and its working fine again now :) Thanks for your help :)
bobster65
11-27-2007, 11:34 PM
I got it thanks, I had the old tabs_block_main template. Changed that and its working fine again now :) Thanks for your help :)
No Problem... when you get time, click install ;) :cool:
hey, im not excellent at hard coding PHP so could I get a little bit of assistance in preparing a tabexternal.php for a specific GARs module I am trying to put together to work with this script. basically what this module does is pull the latest defined amount of stories you want pulled from a specific GARs forum, and displays it similarly to how recent threads are displayed in the recent thread tabexternal.php. the only difference is that there is a GARs header_image that is pulled, and also a byline that are taken from different sql tables (gars g sql tables, not thread tables). if any of you use GARs, you should have an idea of what i'm talking about.
here is the GARs module code i am trying to plug into your ajax tabs script:
<?php
//SETTINGS
$forumids = "20"; // Comma seperated list of forumids
$limit = 5; // How many items to show
$title = "News"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 1; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 0; // 1=show ratings
$template = 2; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 1; // 0 = rand, 1=desc, 2=asc
$maxchars = 400; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
$parsebb = true; //set to true to parse preview
// END SETTINGS
switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}
$sql = "SELECT g.threadid,g.header_image image, p.title, g.byline, t.forumid, t.dateline, t.postuserid, t.postusername " .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 " . ($customfields ? ",gcv.*" : "") . " FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gcv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit";
$results = $db->query_read($sql);
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
if ($template==2)
{
$vertical = 1;
}
$mods['colspan'] = ($template==2 ? 3 : $x);
$mods['collapse'] = $mods['modid'];
$modcollapse = $vbcollapse["collapseobj_module_" . $mods['modid'] . ""];
$modimgcollapse = $vbcollapse["collapseimg_module_" . $mods['modid'] . ""];
while ($result = $db->fetch_array($results))
{
if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}
if ($parsebb && $template!=3)
{
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0, 1, 1, 1);
}
else
{
$result['message'] = strip_bbcode($result['synopsis']);
}
if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
$result['dateposted'] = vbdate($vbulletin->options['dateformat'], $result['dateline']);
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
if ($vertical && ($template != 2))
{
$modulehtml .= "<tr>$bits</tr>";
}
elseif ($vertical && $template == 2)
{
$mods['title'] = "<a href=\"$bburl/showthread.php?t=$result[threadid]\">$result[title]</a>";
$modulehtml = $bits;
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_module_shell') . '";');
}
else
{
$modulehtml .= $bits;
$x++;
}
}
if ($modulehtml && ($template != 2))
{
if (!$vertical)
{
$modulehtml = "<tr>$modulehtml</tr>";
}
$home[$mods['modid']]['content'] .= $modulehtml;
}
elseif ($modulehtml && $template == 2)
{
$mods['noshell'] = true;
}
?>
This is actually a CMPS module file, intended to be used with vBa CMPS, plugged in via the CMPS module system. you can find the actual module file and more information on the module here:
http://www.thevbgeek.com/showthread.php?t=1439
You can see the module running right on my webpage, underneath the News & Press Releases block, over at:
http://www.ready-up.com
Please help me to get this module running within the ajax tabs, I think it would be a great addition to this script as a lot of people use GARs. I tried myself to get it working, and I will continue trying on my own but like I've said i'm not so great at hardcoding PHP so i'm posting here in hope of getting a little bit of assistance. if i do happen to get this working, i will post the tabexternal php files for everyone else to use.
thanks in advance to anyone who helps out
glorify
11-30-2007, 01:02 AM
Don't have experience with Gars. Your site rocks btw :)
thanks man, so does yours
------------------------------
**UPDATE
I actually got it working on my own i'll post the files soon...you can see it running on my site right now for the news articles. im going to try to make one for the gallery also...
Maddogz420
01-03-2008, 11:20 PM
Had a problem, fixed it. Just misread the instructions..
Great hack, installed!
Okay, now we have this...
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/vba_cmps_include_template.php on line 47
http://www.mischiefsociety.com/vb/cmps_index.php?page=testhomepage
But it doesnt matter, im using html pages anyways....
bobster65
01-03-2008, 11:29 PM
http://www.mischiefsociety.com/vb/cmps_index.php?page=testhomepage
Having some trouble with this... Ive gone thru the instructions a thousand times now and just gotta ask... how'd i fudge this one up?
I've seen this issue before (you are not the first).... trying to remember exactly what the cause was... I know its something simple..... I'm sure I will remember what the solution is in a few and THIS time I will write it down and add it to the troubleshooting guide lol.. sorry that you are having problems installing it.. we'll get ya hooked up even if I have to take a closer look at your setup.
Thanks.. Bob
EDIT: Remembered what it was... incorrect path to either the CSS or JS file or forgot to do the first few procedures in Step 5 of the instructions..
bobster65
01-03-2008, 11:37 PM
Had a problem, fixed it. Just misread the instructions..
Great hack, installed!
Okay, now we have this...
http://www.mischiefsociety.com/vb/cmps_index.php?page=testhomepage
Just remark that include out in the content files
Maddogz420
01-03-2008, 11:51 PM
Thanks, on second thought ill be trying to get one of your php pages you packaged working.. I see you caught all my post edits, didnt think the response would be so quick !
Killer mod dude!
What i did originally was made a template page, instead of making a module then adding it to a page... doh!
bobster65
01-04-2008, 12:06 AM
Thanks, on second thought ill be trying to get one of your php pages you packaged working.. I see you caught all my post edits, didnt think the response would be so quick !
Killer mod dude!
What i did originally was made a template page, instead of making a module then adding it to a page... doh!
Cool Beans... I just happened to be online when you posted :D ... and ya, just remove that include in any of the "content" files that craps out on ya.. everything else will run just fine.
Maddogz420
01-04-2008, 12:23 AM
Heres a live demo if you need one (or another)
http://www.mischiefsociety.com/vb/cmps_index.php
Smecksie stuff =)
bobster65
01-04-2008, 12:31 AM
Heres a live demo if you need one (or another)
http://www.mischiefsociety.com/vb/cmps_index.php
Smecksie stuff =)
:up: right on! You can do just about anything you can dream of with this thing ;)
x YNWA x
01-04-2008, 02:59 AM
brilliant mod, fantastic guy to always willing to help out
mod of the moth
here is it working on my forum
www.pesforum.co.uk
bobster65
01-04-2008, 12:40 PM
brilliant mod, fantastic guy to always willing to help out
mod of the moth
here is it working on my forum
www.pesforum.co.uk
Thank You Buddy :) Looking great!
YzermanCpt
01-05-2008, 04:32 AM
This mods is awesome just so you know. Thank you very much for sharing it.
I have everything set up, but I have one small problem. I have this black background that I can't seem to get rid of. How can I fix this?
You can see what I mean here....
http://www.aotpals.com
bobster65
01-05-2008, 01:02 PM
This mods is awesome just so you know. Thank you very much for sharing it.
I have everything set up, but I have one small problem. I have this black background that I can't seem to get rid of. How can I fix this?
You can see what I mean here....
http://www.aotpals.com
That is either coming from a background set in the CSS or it could be from the CMPS wrapper (somehow).. Check the CSS and see if you have a black background setting or background image that could be doing it.
YzermanCpt
01-07-2008, 12:27 AM
It was in the CMPS Wrapper. It's fixed now. Thank you for the help! ;)
ScottiG
01-11-2008, 09:03 PM
Bobster, Others, Anyone?
Please pardon my newbie-like question, but well, I am a newbie. Anyway, I have downloaded this hack and I think it is going to work great for me once I configure it to the site style I am working on.
Here is my question: I am using the css text and the tabexternal.php that Glorify posted, I have changed the paths to point to my domain, but for some reason I cannot get the recent threads to display - The tabs are there, the outer border is there (in other words, the module is working) but I cannot get it to display the recent thread content.
I do (also) have the recent thread module running below it, just to make sure they were showing the same, but only the VBA recent threads displays... Any thoughts?
Where am I going wrong?
Also, on Glorify's site, there is a box that contains photos with what appears to be RSS type feeds, each photo has a text overlay that links to a full story and the ability for others to post - Is this your work also? if so, How do I go about implementing that on my site? Please advise.
Thanks in advance!
As green as they come,
Scott
bobster65
01-14-2008, 07:21 PM
Bobster, Others, Anyone?
Please pardon my newbie-like question, but well, I am a newbie. Anyway, I have downloaded this hack and I think it is going to work great for me once I configure it to the site style I am working on.
Here is my question: I am using the css text and the tabexternal.php that Glorify posted, I have changed the paths to point to my domain, but for some reason I cannot get the recent threads to display - The tabs are there, the outer border is there (in other words, the module is working) but I cannot get it to display the recent thread content.
I do (also) have the recent thread module running below it, just to make sure they were showing the same, but only the VBA recent threads displays... Any thoughts?
Where am I going wrong?
Also, on Glorify's site, there is a box that contains photos with what appears to be RSS type feeds, each photo has a text overlay that links to a full story and the ability for others to post - Is this your work also? if so, How do I go about implementing that on my site? Please advise.
Thanks in advance!
As green as they come,
Scott
Hey Scott, I replied to you over at the VBA site.
slossetti
01-15-2008, 12:10 PM
Thanks very much.
Defkalion
01-22-2008, 08:34 PM
This is one of the finest, easiest and most impressive modules I have ever used on one of my VB sites.
Many thanks to the author for this release.
I have installed it and working with no problems. I will come back with lotsa questions though, look out :P
Just one for now: how can I use in one of my tabs, an already build module that I have? this module is based on the news.php VBA module, and it's showing latest threads from specific forums, but also with a specific way (tampered with the visual layout of it). Is there a way to hard-code this module inside one of my ajax tabs?
Again congrats for a great work. :)
bobster65
01-22-2008, 08:41 PM
This is one of the finest, easiest and most impressive modules I have ever used on one of my VB sites.
Many thanks to the author for this release.
I have installed it and working with no problems. I will come back with lotsa questions though, look out :P
Just one for now: how can I use in one of my tabs, an already build module that I have? this module is based on the news.php VBA module, and it's showing latest threads from specific forums, but also with a specific way (tampered with the visual layout of it). Is there a way to hard-code this module inside one of my ajax tabs?
Again congrats for a great work. :)
The best way to use VBA Modules is to bypass the vB template system and just echo the data out within the content file itself.. (just like the recent threads example).. Im sure you will figure it out just fine. my PM box is open if you have questions :cool:
reddyink
01-25-2008, 12:49 AM
Bobster,
I would like to know, what is the best way to use pagination code in tab for displaying information in pages within the same tab.
Thanks
bobster65
01-25-2008, 11:30 AM
Bobster,
I would like to know, what is the best way to use pagination code in tab for displaying information in pages within the same tab.
Thanks
I have yet to do anything with pagination.... I know a few members over at vborg have mentioned working on it, but I have not heard from them lately.
gwerzal
01-25-2008, 09:28 PM
This looks like a great mod and i seem pretty silly asking this as everyone else has done just fine installing it.
Im stuck on step 2 lol, everything else i can do.
When it sais modify css file which file am i modifying? The ajaxtabs.css?
if so what do i modify as i cant see anything that would need changing.
Sorry for being so thick but i really want to get this working.
bobster65
01-25-2008, 09:36 PM
This looks like a great mod and i seem pretty silly asking this as everyone else has done just fine installing it.
Im stuck on step 2 lol, everything else i can do.
When it sais modify css file which file am i modifying? The ajaxtabs.css?
if so what do i modify as i cant see anything that would need changing.
Sorry for being so thick but i really want to get this working.
The only silly question is the one not asked lol ;)
yes, the file with the extention .css is the one that is being refered to in step #2 ... (ajaxtabs.css)
Well, in step 2, the only thing to modify in the .CSS file would be the paths to any images .. right now they are just the imagename .. you will find them after url (imagename.gif) .. you will need to put the full path in those.. ie url (forums/ajaxtabs/imagename.gif)
Hope that makes sense?
gwerzal
01-25-2008, 11:22 PM
Thank you for a quick reply.
Il take another look at it now and see if i can get it working.
Thank you very much
bobster65
01-25-2008, 11:43 PM
Thank you for a quick reply.
Il take another look at it now and see if i can get it working.
Thank you very much
No Problem :cool: Please click installed when you have time (and have it working) :D
gwerzal
01-26-2008, 12:10 AM
Hi
I know its not much to go on but has anybody got any idea whats gone wrong
http://www.cashloopholes.co.uk/cmps_index.php
Iv followed it as best as i can but iv obviously gone wrong somewhere
bobster65
01-26-2008, 12:20 AM
Hi
I know its not much to go on but has anybody got any idea whats gone wrong
http://www.cashloopholes.co.uk/cmps_index.php
Iv followed it as best as i can but iv obviously gone wrong somewhere
Well, for one, Tab 1 is not configured correctly.... its set to the default DOMAIN.COM that I put in the instructions.. point it to your domain and tab 1 will work.
You will need to increase the height of the DIV (in the template) so that the content does not overlap... you will also need to edit the .css file and change the width settings. You can change all those values from ###px to 100% and then set static heights or widths later..
Its working, its just a matter of making some adjustments....
ALSO: I just seen that you need to edit the content php files and change the URLS to match your site as well......
You are close, its just a matter of some tweaking and things will start to shape up.
gwerzal
01-26-2008, 12:30 AM
Thank you for your replies they are very much appreciated.
Its getting late now so il have a play with it in the morning and see if i can get it working.
Thanks again.
bobster65
01-26-2008, 12:36 AM
Thank you for your replies they are very much appreciated.
Its getting late now so il have a play with it in the morning and see if i can get it working.
Thanks again.
Yer welcome... I will check back tomorrow and see if you need any help :cool:
peterpiper
01-31-2008, 07:17 PM
how is this supposed to work with vb forums? all the functions are alien to me! and how does it fit in with the templates?
thanks in advance
bobster65
01-31-2008, 07:30 PM
how is this supposed to work with vb forums? all the functions are alien to me! and how does it fit in with the templates?
thanks in advance
This "how to" is written for use with vbadvanced. However, this can be used within vbulletin itself with a little tweaking to the install instructions. For example, instead of the step for creating a template Module... that can be replicated in vb by creating a custom template and integrating that template within an existing page or a custom page.
Im actually surprised that nobody has done this yet.. well, I have, but I mean the community as a whole lol.. 3.7 I see finally has some tabs in the Profile, but still not anywhere else on the forums..
peterpiper
02-01-2008, 08:18 AM
ok, so could you provide a step by step instruction list for vb then please!
bobster65
02-01-2008, 12:50 PM
ok, so could you provide a step by step instruction list for vb then please!
I'll think about it. Got some other things going on right now. If anyone else wants to do it, they have my permission to do so..
bobII
02-01-2008, 11:02 PM
I followed all the steps, but it's not showing any content... When I click on a tab, I "Requesting Content" but nothing displays... Just a plain white screen. Any ideas???
bobster65
02-01-2008, 11:07 PM
I followed all the steps, but it's not showing any content... When I click on a tab, I "Requesting Content" but nothing displays... Just a plain white screen. Any ideas???
sounds like its not finding the content files.. double check ALL and ANY paths to make sure that everything is pointing to the correct files .. makes sure the path to the ajaxtabs.js is correct as well. The most common thing when it just sits and displays "requesting Content" is that is can not find the content file that you are telling it to load.
peterpiper
02-02-2008, 03:45 PM
when i create a separate template, what do i put in it, and how do i link to it from the other main forumdisplay template?
reddyink
02-02-2008, 04:21 PM
bobster,
I am trying to put javascript in php file for expand collapse. I want description field read more, when user click on Read more.. link whole description field should display.
I included onclick event in echo statement for link. but nothing happens.
I would like to know, weather expand/collapse works in ajax tabs onclick event for link.
Thanks
bobster65
02-02-2008, 04:39 PM
bobster,
I am trying to put javascript in php file for expand collapse. I want description field read more, when user click on Read more.. link whole description field should display.
I included onclick event in echo statement for link. but nothing happens.
I would like to know, weather expand/collapse works in ajax tabs onclick event for link.
Thanks
You CAN use additional Javascript, but there is a trick to it (where you include it).. I'll have to dig through my notes (or you can check on dynamic drive if you don't want to wait)... Also, check to make sure the IDs for the expand contract part are not conflicting with anything else that might be on the entire page itself.... that will cause the expand/contract to not work as well.. if it uses IDs, change then to some high number like 8749 lol (hope that made sense)
manning
02-02-2008, 04:43 PM
Curious, is this what vbulletin.com is using on its member.php pages?
bobster65
02-02-2008, 05:17 PM
Curious, is this what vbulletin.com is using on its member.php pages?
I doubt it.. they probably are using YUI or wrote their own custom version.. Im sure the base code is almost the same tho and the basic functionality is.
manning
02-02-2008, 11:57 PM
I doubt it.. they probably are using YUI or wrote their own custom version.. Im sure the base code is almost the same tho and the basic functionality is.
No doubt they were inspired ;) hopefully if they were they owned up to it. Either that or this mod was inspired by 3.7 if it was out back then ... beats me I actually hadnt noticed a 3.7 site until I clicked on a member profile eariler and thought wow this sorta looks neat. LOL!
bobster65
02-03-2008, 12:08 AM
No doubt they were inspired ;) hopefully if they were they owned up to it. Either that or this mod was inspired by 3.7 if it was out back then ... beats me I actually hadnt noticed a 3.7 site until I clicked on a member profile eariler and thought wow this sorta looks neat. LOL!
Na, this mod was inspired by many non vb portals (Yahoo, ESPN, NFL.com etc) .. I've been doing tabbed stuff outside of vB for years and just felt like it was something that was missing with vbadvanced, so I wrote up a mod for it. I've got some vb specific stuff that I have not released yet like Tabbed Forum Home (example bbwforums.net) and the Whos on Line section broke out into Tabs with Paul M's stuff as well) saves a lot of space on the main forums page ;)
reddyink
02-03-2008, 02:39 AM
Bobster,
As you suggested, I looked at dynamicdrive code and using and I need your help for the error I am getting. When i call onclick event in echo statement in php page. I am getting follwing error
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\EasyPHP 2.0b1\www\upload\tabexternal5.php on line 71
The line where I am getting error is
echo'<input type="button" onclick="javascript:return toggleMe('para1');" value="Toggle">';
echo '<div id="para1">
Decription here....
</div>';
When I change to double quotes like 'para1' to "para1" and also tried with '.para1.'
onclick="javascript:return toggleMe("para1");" value="Toggle">'; - no errors but nothing is happening when I click on toggle button.actually it should expand/collapse.
Javascript:
<script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
}
else{
e.style.display="none"
}
return true;
}
</script>
Please help me with this echo statement javascript onclick.
Thanks for your reply
bobster65
02-06-2008, 05:14 PM
For those of you that have been wanting to display Post Icons and or limit the thread title character limit for the recent threads content file within a tab, check out the attached file.
PLEASE NOTE: all paths in this file are assumed that you have your forums installed in {forums} folder off the root ie /forums/showthread.php so if you have a different set up, just edit those lines to the correct path and everything will work as it should.
LINES OF CODE TO EDIT FOR YOUR PERSONAL NEEDS:
Line 46: Change 30 to the cut of length you wish.
$mod_options['portal_threads_maxchars'] = '30'; // SET THIS FOR THE MAX NUMBER OF CHARACTERS YOU WANT TO DISPLAY FOR THE THREAD TITLE
Line 68: Change this to pull threads from which ever forums you desire.. you can edit/add/or delete ..
AND thread.forumid=15 or thread.forumid=31 or thread.forumid=32 or thread.forumid=33
Line 72: Change the number to display the amount of threads you wish.
LIMIT 15
Lines 156-180: You MAY have to change the paths on all the href's .. Change to match your individual forums setup.
bobster65
02-06-2008, 05:34 PM
Bobster,
As you suggested, I looked at dynamicdrive code and using and I need your help for the error I am getting. When i call onclick event in echo statement in php page. I am getting follwing error
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\EasyPHP 2.0b1\www\upload\tabexternal5.php on line 71
The line where I am getting error is
echo'<input type="button" onclick="javascript:return toggleMe('para1');" value="Toggle">';
echo '<div id="para1">
Decription here....
</div>';
When I change to double quotes like 'para1' to "para1" and also tried with '.para1.'
onclick="javascript:return toggleMe("para1");" value="Toggle">'; - no errors but nothing is happening when I click on toggle button.actually it should expand/collapse.
Javascript:
<script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
}
else{
e.style.display="none"
}
return true;
}
</script>
Please help me with this echo statement javascript onclick.
Thanks for your reply
Hey Ready, can you zip up the entire file and anything else that goes along with it so I can play with it on my dev server? those ' around para1 are causing that error by the way..
anyway, if you can do that.. just PM me and I will give you my email addy so that you can send the file.
petteyg359
02-07-2008, 04:49 PM
Layout question. I've got tabs working, I've added my forum CSS to the top of ajaxtabs.css and my testtabs.php page has the same theme as my forum now. First, where would I change the CSS (I'm using "indentmenu") to move the tab menu to the top?
Then, I have another custom PHP file, with a custom template. The PHP file loads a bunch of nested tables, theads, tcats, collapsing trs and tds, into strings, and then the template displays certain strings depending on the usergroup of the person looking at the page. I would like to replace some of the nested collapsing stuff with tabs like these. Should I just move the ajaxtabs template into the custom PHP file where I need tab boxes? Can I place dynamic content (loaded from MySQL) into the tab boxes, rather than loading a file?
bobster65
02-07-2008, 05:48 PM
Layout question. I've got tabs working, I've added my forum CSS to the top of ajaxtabs.css and my testtabs.php page has the same theme as my forum now. First, where would I change the CSS (I'm using "indentmenu") to move the tab menu to the top?
The Tab menu for the Indentmenu CSS SHOULD be on the top (unless you didn't use the template formatting for the Indentmenu as shown in Post 2 of this thread). The template layout is different for each of the 3 provided CSS... Sounds like you just changed the name of the CSS in the DIV on the template that is arranged for the Modern Bricks CSS.. just take a quick look at post 2 and make sure that the template is formatted correctly for use with the Indentmenu CSS..
Then, I have another custom PHP file, with a custom template. The PHP file loads a bunch of nested tables, theads, tcats, collapsing trs and tds, into strings, and then the template displays certain strings depending on the usergroup of the person looking at the page. I would like to replace some of the nested collapsing stuff with tabs like these. Should I just move the ajaxtabs template into the custom PHP file where I need tab boxes? Can I place dynamic content (loaded from MySQL) into the tab boxes, rather than loading a file?
Ya know.... what I think would work better for that would be the NON AJAX tabs. That is what I use for my Tabbed Forum Home .. the code is easy to imbed in php or via the vb template system.. You wouldn't need the AJAX version if you did it the way you are talking, because with the tabs imbeded into the php file itself, when you click on a tab, its going to execute the code within its area of the file (hope that made sense) lol if not, I will try and explain it better.
stonner
02-07-2008, 06:30 PM
Hi
I tried to add a tab with the newest profile photos. But it shows this error:
Parse error: syntax error, unexpected '<' in /home/stonner/public_html/forums/tabexternal4.php on line 42
Could you please help me?
I attached my file tabexternal4.php.
Thank you very much
bobster65
02-07-2008, 06:56 PM
Hi
I tried to add a tab with the newest profile photos. But it shows this error:
Parse error: syntax error, unexpected '<' in /home/stonner/public_html/forums/tabexternal4.php on line 42
Could you please help me?
I attached my file tabexternal4.php.
Thank you very much
That error is because you need to echo out HTML in the file.. after looking at what you are trying to do, I think that the iframe option would be the best (since you are calling external javascript) .. I don't have any iframe stuff that you could look at that would help, so I would suggest going to dynamic drive and reading the section on iframes for AJAX Tabs 2 .. I'll do some digging when I have some spare time.. just have not played with that option yet (but know that its the best for what you are attempting)..
bobster65
02-07-2008, 09:46 PM
*Update* added two new sample content files for use with this addon as well as a sample make your own file (Replicate the vBa UserCP Block)
The FILES for these are located in Post 3 of this Thread.
NEW 02-07-2008 - tabrecentthreadsexp2.php - This file includes Post ICON Column and the ability to set a specific Thread Title Character cut off amount.
NEW 02-07-2008 - tab_blog.php - This content file is for use with vbulletins blog system. It is a BASIC recent blogs layout. The File contains 2 Layout Styles (Wide and Small). Wide is the default. To use small (for skinny Tab Layouts) remark out the 2 Wide Layout Areas and uncomment out the 2 ALT Layout Areas. Both display Title, Name, Data and Views.
What to make your own?
Check out Post 3 of this thread to see an example of replicating the USER CP BLOCK.
I apologize, I said I would post up the GARs tab that I completed and I completely forgot. For those of you using GARs for articles on your vBulletin forums, if you would like to display the latest recent GARs articles within an Ajax TAB you can do so with the following .php file:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tabrecentthreadsexp'); // 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(
);
// 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 '<table border="0" cellpadding="0" cellspacing="0" width=100%><tr>';
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
$forumids = ""; // Comma seperated list of forumids
$limit = 4; // How many items to show
$title = ""; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 0; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 0; // 1=show ratings
$template = 2; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 1; // 0 = rand, 1=desc, 2=asc
$maxchars = 150; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
$parsebb = true; //set to true to parse preview
switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}
// COMMENTED OUT FOR TESTING
($hook = vBulletinHook::fetch_hook('vba_cmps_module_recthre ads_start')) ? eval($hook) : false;
// Main SQL
$results = $db->query_read("SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit");
while ($result = $db->fetch_array($results))
{
if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}
if ($parsebb && $template!=3)
{
$result['message'] = strip_bbcode($result['synopsis']);
}
if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
echo '<tr>' . $bits . '</tr>';
}
echo "</table>";
?>
Basically, I just took the GARs vB CMPS module file and merged it with the recent threads tab file that came with this Ajax TABS script (I think thats what I did? It's been a little while so I kind of forgot. :rolleyes:)
I hope this helps anyone using GARs and the Ajax TABs script. You can see this running live at my website (www.ready-up.com). There is currently a small bug in firefox with my nested tabs, just hit the "Home" link on the top of the page if you are using firefox and you should be able to see the tabs working perfectly after that. PM me if you have any questions or problems setting that up.
Thanks again bob, wonderful script! :cool:
bobster65
02-08-2008, 04:57 PM
Hello
Thanks for your help!
what I want is to put is based on this hack
http://www.vbadvanced.com/forum/showthread.php?t=18416
I want to dis play new or random links from links directory. The ways is like this
------------------------------------------
-Link name --Category name
-Link name2- category name 2
-link name 3- category name 3
------------------------------------------
And if the name of link is too long it is automatically cut of(for not break my page).
Sorry but I would like to post here instead of PM you because I want other members who are interested in share idea.
OK.. this was pretty simple actually and I made you two different styles (basic and expanded) .. The Basic one is just as you described above. The Expanded one includes the Link Name, Author, Date, Time, Category, # of Replies and # of Views.
Each file comes with various configuration settings to meet your needs/requirements.. ie
$linkurl Variable (The full URL Path to your vba links directory)
$order Variable can be set as follows (1 = newest, 2 = most viewed, 3 = most comments, 4 = highest rated, 5 = random) to give you 5 different ways of displaying your data for your members.
$limit Variable can be set to the number of links you would like to display
$maxnamechars Variable used to set the max characters of the links name before the rest will be replaced with '...' NOTE: Set this to 0 to disable it.
Both files contain the same basic code, just different echo output to control the Layout for the Data.
To further customize the layout, look for the echo statements and edit the HTML output.. simple as that :cool:
duncan99
02-18-2008, 11:05 AM
https://vborg.vbsupport.ru/external/2008/02/17.jpg
This is an mazing hack I have ever seen, thank you for your time to code.
I have a little request, I just want to make a simple tab category for different categories in a forum like the picture shown, say I click on announcement tab it only pulls out the threads about announcement, click on recent NFL news it shows only thoses threads of NFL news. Can somone show me how, the more I read on the post the more I confuse...
Thank you in advance...
bobster65
02-18-2008, 12:34 PM
https://vborg.vbsupport.ru/attachment.php?attachmentid=71575&d=1193424613
This is an mazing hack I have ever seen, thank you for your time to code.
I have a little request, I just want to make a simple tab category for different categories in a forum like the picture shown, say I click on announcement tab it only pulls out the threads about announcement, click on recent NFL news it shows only thoses threads of NFL news. Can somone show me how, the more I read on the post the more I confuse...
Thank you in advance...
Well, you will need to make 4 .php files (use the recentthreads example file and make 3 additional copies of it). Then, edit each file to contain only the forum ID you wish. Upload those new files, then edit the template, change the tab names to what ever you want and point each tab to the specific file.
ericgtr
02-18-2008, 04:26 PM
bobster, I just wanted to say thanks for all of your work on this. Your support is nothing less than superb and you deserve a lot of credit. I installed it on my site this morning and it's working great!
bobster65
02-18-2008, 04:40 PM
bobster, I just wanted to say thanks for all of your work on this. Your support is nothing less than superb and you deserve a lot of credit. I installed it on my site this morning and it's working great!
You are more than welcome Eric. If you have any questions, feel free to PM me anytime.
barroca
02-22-2008, 01:53 PM
hello bobster,
first: a hudge thank you for this work :)
I see in dynamic drive page a new js version. We can update in our installs?
The new version have a interesting feature [forward/reward] tabs
All the best
Joao Barroca
aka beduino
bobster65
02-22-2008, 02:06 PM
hello bobster,
first: a hudge thank you for this work :)
I see in dynamic drive page a new js version. We can update in our installs?
The new version have a interesting feature [forward/reward] tabs
All the best
Joao Barroca
aka beduino
I was just there yesterday and didn't see it lol .. Im sure you can upgrade without any problems.. might have to change a few things in the template, but thats about it (besides uploading the new .js file) ..
I'll check things out :up:
EDIT: OK, checked it out. Nothing major, just a .(dot) release. All you need to do is upload the new .js and you can use the forward/back feature. When I get time, I will update posts 1-3 with the new available info. Thanks for the heads up bud!
barroca
02-25-2008, 02:44 PM
Unfortunately don't works with me.
I already pm you :)
tks
Joao barroca
aka beduino
in time: what we need change here?
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
I can change bburl to my portal's url?
x?
html?
:rolleyes: tks in advance!
I apologize, I said I would post up the GARs tab that I completed and I completely forgot. For those of you using GARs for articles on your vBulletin forums, if you would like to display the latest recent GARs articles within an Ajax TAB you can do so with the following .php file:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'tabrecentthreadsexp'); // 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(
);
// 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 '<table border="0" cellpadding="0" cellspacing="0" width=100%><tr>';
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
$forumids = ""; // Comma seperated list of forumids
$limit = 4; // How many items to show
$title = ""; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 0; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 0; // 1=show ratings
$template = 2; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 1; // 0 = rand, 1=desc, 2=asc
$maxchars = 150; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
$parsebb = true; //set to true to parse preview
switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}
// COMMENTED OUT FOR TESTING
($hook = vBulletinHook::fetch_hook('vba_cmps_module_recthre ads_start')) ? eval($hook) : false;
// Main SQL
$results = $db->query_read("SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit");
while ($result = $db->fetch_array($results))
{
if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}
if ($parsebb && $template!=3)
{
$result['message'] = strip_bbcode($result['synopsis']);
}
if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
echo '<tr>' . $bits . '</tr>';
}
echo "</table>";
?>
Basically, I just took the GARs vB CMPS module file and merged it with the recent threads tab file that came with this Ajax TABS script (I think thats what I did? It's been a little while so I kind of forgot. :rolleyes:)
I hope this helps anyone using GARs and the Ajax TABs script. You can see this running live at my website (www.ready-up.com). There is currently a small bug in firefox with my nested tabs, just hit the "Home" link on the top of the page if you are using firefox and you should be able to see the tabs working perfectly after that. PM me if you have any questions or problems setting that up.
Thanks again bob, wonderful script! :cool:
beduino
02-26-2008, 02:27 AM
Well
the only way [IMHO] of php to vbblog works is changing
line 24~26 to
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
//require_once('./includes/vba_cmps_include_template.php');
require_once('./includes/vba_cmps_global.php');
and line 52
FROM " . TABLE_PREFIX . "blog as blog
all the best
bobster65
02-26-2008, 03:23 AM
Well
the only way [IMHO] of php to vbblog works is changing
line 24~26 to
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
//require_once('./includes/vba_cmps_include_template.php');
require_once('./includes/vba_cmps_global.php');
and line 52
FROM " . TABLE_PREFIX . "blog as blog
all the best
Did you try the Blog addon that I have attached to the #3 post of this thread? It works jsut fine :cool:
beduino
02-26-2008, 11:17 AM
Hello Bobster,
first: tks for your attention and support :)
second: I try with orig tab_blog [#post3] but i need make this little adjusts to work.
third: you already think about make one php to DownloadsII [of cyberanger and Jelle]? :rolleyes:
tks again
beduino
Nikke
02-28-2008, 12:32 PM
I apologize, I said I would post up the GARs tab that I completed and I completely forgot. For those of you using GARs for articles on your vBulletin forums, if you would like to display the latest recent GARs articles within an Ajax TAB you can do so with the following .php file:
Basically, I just took the GARs vB CMPS module file and merged it with the recent threads tab file that came with this Ajax TABS script (I think thats what I did? It's been a little while so I kind of forgot. :rolleyes:)
I hope this helps anyone using GARs and the Ajax TABs script. You can see this running live at my website (www.ready-up.com). There is currently a small bug in firefox with my nested tabs, just hit the "Home" link on the top of the page if you are using firefox and you should be able to see the tabs working perfectly after that. PM me if you have any questions or problems setting that up.
Thanks again bob, wonderful script! :cool:
I really love how this looks on your page. I'm wondering however, can this be used on FORUMHOME?
bobster65
02-28-2008, 03:40 PM
I really love how this looks on your page. I'm wondering however, can this be used on FORUMHOME?
yes it can... instead of creating a template module in CMPS, just put the "template code" into the forums home template where you want it. I have really meant to write a how to for this, but just have not had the time..
bobster65
02-28-2008, 03:43 PM
Hello Bobster,
first: tks for your attention and support :)
second: I try with orig tab_blog [#post3] but i need make this little adjusts to work.
third: you already think about make one php to DownloadsII [of cyberanger and Jelle]? :rolleyes:
tks again
beduino
I've not looked into making one for DownloadsII (yet). I usually only release stuff that I have a need for on my personal site or stuff that Clients have requested and don't mind me releasing to the members of vborg. I'll put it on the to do list tho ;)
Nikke
03-05-2008, 11:16 AM
How can I order the threads by creation date, not by last post date?
Nikke
03-05-2008, 11:26 AM
Here is a suggestion for someone who knows php:
Make a Tab-system with:
Most Discussed | Most read
and do three sub-tabs for day - week - month. It would show most discussed - day as the default window. Then you could choose what you would want to show. It could show TOP 10 for everything for example!
Would be a hit, I know it :)
Merrillizer
03-20-2008, 04:15 PM
Hi. I have this on my portal. But I am having a problem in higher resolution. As you can see in the screenshots below, 1024x768 is fine. But when I tested the block in higher resolutions (I use Firefox, but tested in both FF and IE7), like 1280x1024, the block shrinks and does not "adapt" to the higher res. like the rest of the blocks do. Can someone help me to get it to adapt/conform automatically to higher resolutions like the other blocks do? For instance the shoutbox stretches/lengthens automatically. Is there some code I need to add to the tabbed block to get it to work? Thanks! Screenshots....
https://vborg.vbsupport.ru/external/2008/03/34.jpg
https://vborg.vbsupport.ru/external/2008/03/35.jpg
bobster65
03-20-2008, 04:42 PM
Hi. I have this on my portal. But I am having a problem in higher resolution. As you can see in the screenshots below, 1024x768 is fine. But when I tested the block in higher resolutions (I use Firefox, but tested in both FF and IE7), like 1280x1024, the block shrinks and does not "adapt" to the higher res. like the rest of the blocks do. Can someone help me to get it to adapt/conform automatically to higher resolutions like the other blocks do? For instance the shoutbox stretches/lengthens automatically. Is there some code I need to add to the tabbed block to get it to work? Thanks! Screenshots....
I would change any of the static width values in both the template divs and CSS to 100% ..
Merrillizer
03-20-2008, 04:59 PM
I would change any of the static width values in both the template divs and CSS to 100% ..
Awesome! Thank you! It worked. I changed the width in the block (template) file from 600px to 100%, and I left the height the same. Works great now! :up:
bobster65
03-20-2008, 05:19 PM
Awesome! Thank you! It worked. I changed the width in the block (template) file from 600px to 100%, and I left the height the same. Works great now! :up:
Sweet :cool:
btw, if you like that CSS version but want the tabs on the top I have a solution for that as well which works better if you have height issues with content.
Pistils
04-17-2008, 08:48 AM
Id like to start by saying , This is without a doubt one of the best mods i have ever seen for vb.. top job.. i just wish i knew more about coding so i could get it done without hassling you for help..
Im at teh need to edit tabexternal.php file and i cant for teh life of me find where i neeed to edit teh file.. could you please paste a snippet example of adding forum ids and where please bobster.. id very much appreciate the help..
regards
Wayne
bobster65
04-17-2008, 01:37 PM
Id like to start by saying , This is without a doubt one of the best mods i have ever seen for vb.. top job.. i just wish i knew more about coding so i could get it done without hassling you for help..
Im at teh need to edit tabexternal.php file and i cant for teh life of me find where i neeed to edit teh file.. could you please paste a snippet example of adding forum ids and where please bobster.. id very much appreciate the help..
regards
Wayne
Hi Wayne,
tabexternal.php is not a recent threads sample, so it won't have anything to do with forumIDs, it is more for static content that you wish to add.. the other files in the zip (tabexternal2, tabexternal3, tabexternal4) are for recent threads examples and there is a text doc (Instructions for PHP Samples) in the zip that explains how to edit the php content files.
HOWEVER ....
I would highly suggest using the tabrecentthreadsexp2.php file for recent threads rather than the tabexternal files. You can grab this newest file on the 3rd post in this thread ( https://vborg.vbsupport.ru/showpost.php?p=1369244&postcount=3 ) To set the FormIDs in this version, go to line 68 (in this sample, I am pulling from Forum 15, 31, 32 and 33 ... )
AND thread.forumid=15 or thread.forumid=31 or thread.forumid=32 or thread.forumid=33
The tabrecentthreadsexp2.php is a much better file to use.
Bobster
Pistils
04-18-2008, 06:35 AM
Thankyou bobster, i think soem people are coder orientated and soem just arent.. i fall into the latter cat..lol... i think my problem is reading teh whole thread before startin as all teh suggested edits to improve seo etc got me all confused..
i am a little lost as to setting up modules etc and wrappers in vbadvanced as i haev only had it installed a few weeks and havent really gotten to grips with it..
i am just working on pulling 4 seperate tabs displaying recent threads from 4 seperate areas of my board, id like 5 Tabs total with the first showing a flash welcome message/animation
I have a couple of questions for when i do get this working.. i have phpprobid auction and photopost pro, is it possible to pull latest listings from the auction and latest uploads from gallery into a tabs also? do you know any examples of anyone else doing this? 1 last question bobster...
have you included any suggested seo improvement edits suggested by themilkcarton? or will i need to go back through and follow these edits myself? i wish this was a plugin..lol
thankyou for an awesoem mod.. just wish i werent so thick..
regards
Pistils
Pistils
04-18-2008, 07:42 AM
well, im doing somat wrong for sure.. !!>?? heres a screengrb of what i see after adding the module to vbadvanced.. i get the latest threads but only 1 window? no tabs.. i see the retreiving data image if i refresh...
any tips please.. for a sore headed code ellergic nood please?
any help much appreciated.. i know this is like water off a ducks back for some of u..
regards
Pistils
bobster65
04-18-2008, 12:47 PM
well, im doing somat wrong for sure.. !!>?? heres a screengrb of what i see after adding the module to vbadvanced.. i get the latest threads but only 1 window? no tabs.. i see the retreiving data image if i refresh...
any tips please.. for a sore headed code ellergic nood please?
any help much appreciated.. i know this is like water off a ducks back for some of u..
regards
Pistils
We'll get ya through this.. just take a deep breath :D I sent you a PM ..
Pistils
04-18-2008, 01:35 PM
Hey there bobster.. thankyou for replying..
im so please to have the man helping me.. :) ive seen soem proper smart adaptions of this code on some sites and im jealous..lol im going to get this working if it kills me..lol
( i have no private messages from you buddy.. did you press send? or isnt vb.org working for me too? lol just my luck )
where i am thus far...
edited css and uploaded with the js file... uploaded in forums/ajaxtabs/ajaxtabs.css and ajaxtabs.js
I have named 4 of your tabrecentthreadsexp1 through to 4.. they all display same forums at the minute but ill change that when i see it working... they reside in forums/tabrecent..... 1 2 3 & 4..
I have attempted to create the wrapper with alt_module_wrapper_template code
created template in vbstyles under same style im using
created a recent threads module and included teh previous 2 files.. < this is the part i think im not getting ritght.. im v v new to vbadvanced and cant find any walkthrough examples to show me what to select and what not to select.. php or template? ill keep trying till i get it..
If you could resend me that pm bobster.. its full of needed info..lol Thank You in advance..
regards
Pistils
ps.. has anyone got flash applets working in these? swf o swv movies? can i ask what kind of gallery was installed on the site ( s) you have done custom gallery work for bobster, pelase?
bobster65
04-18-2008, 01:48 PM
Hey there bobster.. thankyou for replying..
im so please to have the man helping me.. :) ive seen soem proper smart adaptions of this code on some sites and im jealous..lol im going to get this working if it kills me..lol
( i have no private messages from you buddy.. did you press send? or isnt vb.org working for me too? lol just my luck )
where i am thus far...
edited css and uploaded with the js file... uploaded in forums/ajaxtabs/ajaxtabs.css and ajaxtabs.js
I have named 4 of your tabrecentthreadsexp1 through to 4.. they all display same forums at the minute but ill change that when i see it working... they reside in forums/tabrecent..... 1 2 3 & 4..
I have attempted to create the wrapper with alt_module_wrapper_template code
created template in vbstyles under same style im using
created a recent threads module and included teh previous 2 files.. < this is the part i think im not getting ritght.. im v v new to vbadvanced and cant find any walkthrough examples to show me what to select and what not to select.. php or template? ill keep trying till i get it..
If you could resend me that pm bobster.. its full of needed info..lol Thank You in advance..
regards
Pistils
ps.. has anyone got flash applets working in these? swf o swv movies? can i ask what kind of gallery was installed on the site ( s) you have done custom gallery work for bobster, pelase?
Hang on, I'll PM you again... its probably something simple and we'll get you up and running :cool:
byoungjr
05-09-2008, 01:33 AM
I love this mod. I am trying to pull an attachment image onto my recent threads tab. How can I accomplish this? THANKS!!!
Neutral Singh
05-18-2008, 01:50 PM
Simply posting to say Thank You for This Plugin!! Great Job!!
Nikoo
05-22-2008, 01:39 PM
Hi,
I thinks this is a great mode but i have 2 problems:
1: is that i like the tabs on the top and not down, what do i have to change for that?
2: when i click the links in the tabs i go to this address: http://www.domain.com/forums/showthread.php?t=495 i wonder where i forgot to edit the right address?
Thanks.
bobster65
05-22-2008, 01:50 PM
Hi,
I thinks this is a great mode but i have 2 problems:
1: is that i like the tabs on the top and not down, what do i have to change for that?
2: when i click the links in the tabs i go to this address: http://www.domain.com/forums/showthread.php?t=495 i wonder where i forgot to edit the right address?
Thanks.
Hi Nikoo
1 - In Post 2 of this thread, there are 2 additional layouts. The CSS for those layouts are already contained in the .CSS File and post 2 shows how to change the layout code for the template. You can also convert those tabs from Bottom to Top (I think I explained how to do that in my thread at vbadvanced) ..
2. Looks like you didn't edit one or more of the content files (or the template).. you need to replace domain . com with your domain ;)
Nikoo
05-22-2008, 09:47 PM
Thanks Bob.
I manage to change to the top but i wonder im using vbseo could this cause a conflict to the links inside the tabs?
I also wonder if i want to add some content in HTML, whats the process?
///Nikoo
bobster65
05-22-2008, 09:58 PM
Thanks Bob.
I manage to change to the top but i wonder im using vbseo could this cause a conflict to the links inside the tabs?
I also wonder if i want to add some content in HTML, whats the process?
///Nikoo
It shouldn't ... I've not had any problems with vbseo and this. Its fully search engine unobtrusive as well.
you can create your own content files.. I believe that I included some samples for simple HTML content within the zip file... creating content files for this is limitless...
Nikoo
05-22-2008, 10:56 PM
Fixed the links and now i just have to reedit the style in ccs but i couldn't find the sample for HTML in the zip file, i just found : instructions for PHP sample ) :
bobster65
05-22-2008, 11:05 PM
Fixed the links and now i just have to reedit the style in ccs but i couldn't find the sample for HTML in the zip file, i just found : instructions for PHP sample ) :
simply create a file and name it something like tabcontent.htm then in that file put your HTML that you want to display and use that file for one of your tabs... Its that simple :)
Nikoo
05-23-2008, 08:02 AM
As you said it works, easy and fast :p
is it possible to add pictures in the php files and do you know the code?
Thanks for your help!!!
bobster65
05-23-2008, 11:21 AM
As you said it works, easy and fast :p
is it possible to add pictures in the php files and do you know the code?
Thanks for your help!!!
Yes, anything is possible ;)
You can add both static and dynamic pictures.
for static images, you could just Echo out basic HTML with in the php content file.
<?php
echo '<table align="center" cellspacing="2" cellpadding="0" width=100%>';
echo '<tr align="center"> <td rowspan="4"><b><img src="http://www.DOMAIN.com/forums/images/IMAGE.jpg"></b></td></tr>';
echo '<tr align="center"> <td class="largefont"><b>Blah BLah Blah</b></td></tr>';
echo '<tr align="center"> <td class="smallfont"><a href="http://www.DOMAIN.com/forums/forumdisplay.php?f=42"><b>Recent News</b></a></td></tr>';
echo '<tr align="center"> <td class="smallfont"><a href="http://www.DOMAIN.com/forums/forumdisplay.php?f=41"><b>World News Now</b></a></td></tr>';
echo "</table>";
?>
For Dynamic images, you would use php to do that (examples would be any of the Modules for photopost etc.. ) you could take their code and slightly modify it to work as a content file)
Nikoo
05-23-2008, 02:46 PM
Thanks again Bob, i will try this later. ( :
Chief Corn
05-26-2008, 05:57 AM
this is exactly what i was looking for except i don't know how to do it. what i want to do in showthread.php is have the chief post in the first tab separated from the replies in a second tab. any help here?
CFodder
06-01-2008, 09:24 AM
Thanks for a fantastic mod Bobster, just wish I could get it to work, but being the prized nub I am I can't figure it out.
The tabs are setup and appear on my forum hompage and as far as I can see have followed your instructions correctly as far as I know (but hey, who the hell knows it's me after all!!). When the page first loads the button text flashes up but after that they are all blank (have the std 4), when I click on any of the buttons get an error as follows:
"Warning: require_once(./includes/vba_cmps_include_template.php) [function.require-once]: failed to open stream: No such file or directory in /home/oldrdev/public_html/dev/ajaxtabs/tabexternal2.php on line 33
Fatal error: require_once() [function.require]: Failed opening required './includes/vba_cmps_include_template.php' (include_path='.:/usr/local/php52/pear') in /home/oldrdev/public_html/dev/ajaxtabs/tabexternal2.php on line 33"
Any help would be greatly appreciated, I've pm'd you my template module contents and a link for the site.
bobster65
06-01-2008, 01:24 PM
Thanks for a fantastic mod Bobster, just wish I could get it to work, but being the prized nub I am I can't figure it out.
The tabs are setup and appear on my forum hompage and as far as I can see have followed your instructions correctly as far as I know (but hey, who the hell knows it's me after all!!). When the page first loads the button text flashes up but after that they are all blank (have the std 4), when I click on any of the buttons get an error as follows:
"Warning: require_once(./includes/vba_cmps_include_template.php) [function.require-once]: failed to open stream: No such file or directory in /home/oldrdev/public_html/dev/ajaxtabs/tabexternal2.php on line 33
Fatal error: require_once() [function.require]: Failed opening required './includes/vba_cmps_include_template.php' (include_path='.:/usr/local/php52/pear') in /home/oldrdev/public_html/dev/ajaxtabs/tabexternal2.php on line 33"
Any help would be greatly appreciated, I've pm'd you my template module contents and a link for the site.
just comment out (or remove) these lines in the content files..
require_once('./includes/vba_cmps_include_template.php');
CFodder
06-03-2008, 11:03 AM
Didn't work sorry, still got error but this time for vba_cmps_global.php.
Doesn't matter anyway as I tried your tabbed forumhome page and that seems to be working ok, although I will have a coupla questions for ya ;).
bobster65
06-03-2008, 02:05 PM
Didn't work sorry, still got error but this time for vba_cmps_global.php.
Doesn't matter anyway as I tried your tabbed forumhome page and that seems to be working ok, although I will have a coupla questions for ya ;).
This may sound dumb, but what version of vbadvanced do you have installed?
CFodder
06-03-2008, 09:06 PM
VBulletin 3.7.1, VBAdvanced Dynamics 1.0.1 and VBAdvanced CMPS 3.0.0.
And nah, it's not a dumb question :).
bobster65
06-03-2008, 09:16 PM
VBulletin 3.7.1, VBAdvanced Dynamics 1.0.1 and VBAdvanced CMPS 3.0.0.
And nah, it's not a dumb question :).
remark out the require vba_cmps_global.php line as well .. if I remember correctly, I stripped the stuff out that was needed and those are no longer required.. once I am done with version 2 of Tabbed Forum Home, I am going to release a newer version of this one as well.
Defkalion
06-08-2008, 08:11 PM
Hey Bob, congratulations once again for another fantastic mod, I have it working great.
I need help on one thing though: is there a way to load only in the initial page load the tabs and not everytime you click on a tab? I tried setting the
ddajaxtabssettings.bustcachevar=0
to the 0 value, but it only seems to work in IE. In my Firefox, tabs try to load content every time you click on them.
bobster65
09-01-2008, 09:16 PM
** CONTENT FILE UPDATES **
For those of you that have this installed and don't get over to vBa ... I've updated a couple of the content files. The updates are located in the 3rd post of this thread and of course also over at vBa....
(https://vborg.vbsupport.ru/showpost.php?p=1369244&postcount=3)
The main reason for the Update was to ADD in Thread Marking to the recent threads content file as well as the Thumbnail Threads content file.. there are however a few enhancements made to the top of both files for ease of setup and administration. Look for more updates soon.
**UPDATED** RECENT THREADS 09-01-2008 - tabrecentthreadsexp2.php - This file includes Post ICON Column and the ability to set a specific Thread Title Character cut off amount. The UPDATE includes both database thread marking and cookie based thread marking. Various settings at the top of the file make install/Setup a breeze.
**UPDATED** RECENT THREADs with THUMBNAIL 09-01-2008 - tabthumbs.php - This file is the same as tabrecentthreadsexp2.php with the addition of displaying a thumbnail in place of the post ICON if there is a image attached to the first post. You can see an example of this @ www.veggieblogs.com specifically the RECIPES or Cookbooks Tabs. The UPDATE includes both database thread marking and cookie based thread marking. Various settings at the top of the file make install/Setup a breeze.
bobster65
09-01-2008, 09:19 PM
Hey Bob, congratulations once again for another fantastic mod, I have it working great.
I need help on one thing though: is there a way to load only in the initial page load the tabs and not everytime you click on a tab? I tried setting the
ddajaxtabssettings.bustcachevar=0
to the 0 value, but it only seems to work in IE. In my Firefox, tabs try to load content every time you click on them.
Lucky for you, I am going to release version 3.0 sometime this week. It uses YUI Tab View which takes care of that problem for you ;) PLUS, all the content files from the previous versions work flawlessly with it.. I'll be releasing it at vBa first, then here.
Masiello
09-10-2008, 06:29 PM
I need this one Just for vBa 3.0.1 and not the board, like vbseo home layout, can this work? (vb 3.7.3 pl1)
bobster65
09-10-2008, 10:01 PM
I need this one Just for vBa 3.0.1 and not the board, like vbseo home layout, can this work? (vb 3.7.3 pl1)
Yes, This IS for vBa (I also have it released at vBa)..
Masiello
09-11-2008, 05:04 AM
Yes, This IS for vBa (I also have it released at vBa)..
Thanks a lot
karlm
09-12-2008, 06:55 PM
Is this the same one available at vbadvanced.com?
bobster65
09-12-2008, 07:00 PM
Is this the same one available at vbadvanced.com?
yes sir and I am about to release version 3 which uses YUI TabView component. Just finishing up the installation destructions ;)
karlm
09-12-2008, 10:22 PM
yes sir and I am about to release version 3 which uses YUI TabView component. Just finishing up the installation destructions ;)
Excellent!
I've used your forumhome ajax hack and am mighty pleased with the results. Good work, soldier!
Jezlad
09-17-2008, 04:58 PM
Is it possible to use this to display the latest posts via ajax in a side column?
IE self updating when someone posts on the forum index?
bobster65
09-17-2008, 06:40 PM
Is it possible to use this to display the latest posts via ajax in a side column?
IE self updating when someone posts on the forum index?
yes, however, I would recommend using the new version instead (https://vborg.vbsupport.ru/showthread.php?t=191106)
crazymilk
09-22-2009, 08:44 PM
I really want this on my site but i don`t understand steps 4 to 5? I'm i adding 2 modules in vBa Cmps add module? This bit has me confused.
bobster65
09-22-2009, 11:08 PM
I really want this on my site but i don`t understand steps 4 to 5? I'm i adding 2 modules in vBa Cmps add module? This bit has me confused.
no, steps 4 and 5 are creating TEMPLATES for use in STEP 6 which is doing a Template Module
crazymilk
09-23-2009, 05:26 AM
ok so how do i step 4 Create an Alternative Module Wrapper Template?
and Step 5. Create a new Template. is this done in stlye manager?
Think i`m going to need help with this i just don`t see how i make Alternative Module Wrapper Template.
Think i install be i`m not sure if i`ve done it right broke my page up and couldn`t see tabs
crazymilk
09-23-2009, 10:37 AM
this is what i get when i add it to a page
bobster65
09-23-2009, 01:21 PM
this is what i get when i add it to a page
when it puts the items in a "list" that means the application is not finding the CSS and JS files.. so put the full path to both the .css and .js files and it will be fine :)
crazymilk
09-25-2009, 03:03 PM
not working anyone willing to help me?
bobster65
09-28-2009, 09:30 AM
not working anyone willing to help me?
did you do what I said? if so, give me a link to your site so I can see. If its spitting out a bulleted list, then you didn't make the changes as I suggested.
crazymilk
10-02-2009, 11:05 AM
bobster i did try sorry but i`m a noob at this and still learning.
1st off i don`t know how to Create an Alternative Module Wrapper Template and i get confussed from here in the instructions.
Thanks i do appreciate your help sorry i'm not getting it. Really want this on my site
bobster65
10-02-2009, 12:59 PM
bobster i did try sorry but i`m a noob at this and still learning.
1st off i don`t know how to Create an Alternative Module Wrapper Template and i get confussed from here in the instructions.
Thanks i do appreciate your help sorry i'm not getting it. Really want this on my site
I can't GUESS what your issues are. I've asked for a link to your site so I can SEE what the problems are.
As far as creating a template, go to your style manager, and one of the option on the drop down for each style is to add a template. Do that, add the code and hit save. Now you have that template as part of the style which you can use as the alternate module wrapper.
angeljs
10-06-2009, 07:53 AM
This is looking super...would I be able to use these inside threads, like this site (http://www.modthesims.info/download.php?t=368722)? I would need to add differnet options as tabs within each thread started, but only in certain forums, is this possible?
bobster65
10-06-2009, 02:23 PM
it certainly is possible to use the core technology to do something similar.
crazymilk
10-07-2009, 11:08 AM
I still can`t get this to work? Bobster It is not showing on page so there is no point giving you a link. God Knows what i`m doing wrong
bobster65
10-07-2009, 02:20 PM
I still can`t get this to work? Bobster It is not showing on page so there is no point giving you a link. God Knows what i`m doing wrong
no point? How the heck do you expect anyone to help you if you don't let them SEE what the problem is. Saying it doesn't work doesn't give me (or anyone) the slightest clue in what might be the issue. It could be something as simple as incorrect paths to the .js and .css files which I could tell you in a nano second if you'd post a link to your site so I could view the source and check it out.
jaredwilli
01-07-2010, 07:21 PM
love this, will add it later. thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.