vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Module CMPS: AJAX Tabbed Content (https://vborg.vbsupport.ru/showthread.php?t=154653)

bobster65 12-07-2007 02:26 PM

Quote:

Originally Posted by Alfa1 (Post 1396838)
Just a heads up: The 1st post says version 1, while the 2nd post says version 1.5. Where is version 2?

I have installed the version in the 1st post and am getting this error:


EDIT: I found version 2 here: https://vborg.vbsupport.ru/showthread.php?t=161197

ya, just remark out or remove that line. sorry for the confusion.

voter 12-13-2007 05:01 PM

Quote:

Originally Posted by class101 (Post 1382257)
ok I have found how to fix this error ,

you should include cmps files before the vb global one

that way:
PHP Code:

chdir('../');

$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();

require_once(
getcwd().'/includes/vba_cmps_include_template.php');
require_once(
getcwd().'/includes/vba_cmps_global.php');
require_once(
getcwd().'/global.php'); 


Greate, thanks I was having same stuff, now it is gone

TCE Killa 01-24-2008 02:39 PM

I have done everything but I don't know how to create a new CMPS Template Module. I'm using vB 3.6.8. If you can help, I'd highly appreciate it, thanks.

bobster65 01-24-2008 02:49 PM

Quote:

Originally Posted by TCE Killa (Post 1428008)
I have done everything but I don't know how to create a new CMPS Template Module. I'm using vB 3.6.8. If you can help, I'd highly appreciate it, thanks.

CMPS aka vbadvanced (www.vbadvanced.com) is a vbulletin addon.

If you do not have vbadvanced installed, you can still use this on a custom vB page by creating a template instead of a CMPS template module..

TCE Killa 01-24-2008 09:02 PM

Thanks alot man.

ColdSpirit 01-27-2008 12:33 PM

This is very confusing for "noobs"...

Can you explain step by step how to install this on CMPS (like add templates, add pages, add modules?)

From step 4 i cannot go further.... CPMS is so confuse to creade modules, pages, templates, etc...

Thank you in advance,
ColdSpirit

CoffeeToki 02-22-2008 10:43 PM

Hi~ :) When I tried testing this...
I only get a list of links that say:


* Tab 1
* Tab 2
* Tab 3
* Tab 4

Congrats, AJAX Tabbed Content is working on your site!

Any ideas, what I've done wrong? I did follow the instructions. Made a new template, new module (template type), and so forth. Feel free to PM me if you wish. ^__^

bobster65 02-22-2008 10:56 PM

Quote:

Originally Posted by CoffeeToki (Post 1449023)
Hi~ :) When I tried testing this...
I only get a list of links that say:


* Tab 1
* Tab 2
* Tab 3
* Tab 4

Congrats, AJAX Tabbed Content is working on your site!

Any ideas, what I've done wrong? I did follow the instructions. Made a new template, new module (template type), and so forth. Feel free to PM me if you wish. ^__^

Check to make sure that the path to the .ccs file in the template is correct. Not finding the .css file does that.

btw, not to confuse you or throw another bag of worms into the picture, but I did release a newer version (Version 2.0) of this not to long ago that has more features..... there is also a support thread at vBa site. here is the link https://vborg.vbsupport.ru/showthread.php?t=161197

CoffeeToki 02-22-2008 11:11 PM

WooooOoO~ ^___^ Yes, it turns out I needed to give the FULL path name, and not just start from "/forums/...blah blah..." Silly me~!

And I'll look forward to working with the second version. Thank you very much for your quick reply and help! :) Hurray!

bobster65 02-22-2008 11:18 PM

Quote:

Originally Posted by CoffeeToki (Post 1449032)
WooooOoO~ ^___^ Yes, it turns out I needed to give the FULL path name, and not just start from "/forums/...blah blah..." Silly me~!

And I'll look forward to working with the second version. Thank you very much for your quick reply and help! :) Hurray!

No Problem, glad you got it working :cool: In the Version 2.0 thread, in post #3, there are some additional enhance content files.. the newest release of recents threads is much better than the default one that is in this package (just so you know).. AND, it will work just fine with this.. all you would need to do is download recentthreadsexp2.php and you can use it with this version.

CoffeeToki 02-22-2008 11:35 PM

Wow~ I just checked it out and installed them! :) Awesomeness to the Max! ^__^ Thanks, again! (Runs off to play with the CSS and customize!)

davewmack 04-23-2008 05:49 PM

is there any way to add the rotate function to this?

bobster65 04-23-2008 06:01 PM

Quote:

Originally Posted by davewmack (Post 1497470)
is there any way to add the rotate function to this?

I released version 2 of this here: https://vborg.vbsupport.ru/showthread.php?t=161197

It has the rotation ability..

bartek24m 06-17-2008 07:05 PM

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

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


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

PHP Code:


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

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

$recthread_tempname 'exp';

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

                
$mods['colspan'] = 4;

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

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

        
$vba_threads_condition '';

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

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

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

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

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

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

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

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

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

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

                
$rthread_fields '';
                
$rthread_join '';

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

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

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

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

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

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

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

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

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

                        
// Table cell classes
                        
$bgclass 'alt1';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



                 }
        }

$tabstring $thread;


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

        
$foruminfo['allowratings'] = $oldforumratings;

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

//}

echo "</table>";



}   


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

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



Thank you for help

chiptz 09-03-2008 04:42 PM

great release, however i am not able to install it without vbadvanced, does anyone have this working only with vB?

bobster65 09-03-2008 05:27 PM

Quote:

Originally Posted by chiptz (Post 1613746)
great release, however i am not able to install it without vbadvanced, does anyone have this working only with vB?

Ya, if you want it running on say the FORUM HOME

Add this block of code to the HEADINCLUDE Template

Code:

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

Then add this block of code to the FORUMHOME Template where ever you wish to have to displayed.. ie before <!-- MAIN if you want it above the Forums) ..

Code:

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

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

<script type="text/javascript">
var mytabs=new ddajaxtabs("maintab", "ajaxcontentarea")
mytabs.setpersist(true)
mytabs.setselectedClassTarget("link") //"link" or "linkparent"
mytabs.init()
</script>


chiptz 09-07-2008 11:28 AM

Hi,

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

I always get this:

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

Fatal error: require_once() [function.require]: Failed opening required './includes/vba_cmps_include_template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/techzone/public_html/dev/forum/tab_blog.php on line 25

bobster65 09-07-2008 03:20 PM

Quote:

Originally Posted by chiptz (Post 1616536)
Hi,

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

I always get this:

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

Fatal error: require_once() [function.require]: Failed opening required './includes/vba_cmps_include_template.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/techzone/public_html/dev/forum/tab_blog.php on line 25

ya, forgot to mention that you simply strip that that out (the include at the top of each of those content files)...


All times are GMT. The time now is 12:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01540 seconds
  • Memory Usage 1,992KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete