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 - AJAX Tabs Content Script v2 (https://vborg.vbsupport.ru/showthread.php?t=161197)

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?
Code:

$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];

I can change bburl to my portal's url?
x?
html?
:rolleyes: tks in advance!

Quote:

Originally Posted by ZiG (Post 1438553)
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:

Code:

<?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_recthreads_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
Code:

// ######################### 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
Code:

    FROM " . TABLE_PREFIX . "blog as blog
all the best

bobster65 02-26-2008 03:23 AM

Quote:

Originally Posted by beduino (Post 1451138)
Well
the only way [IMHO] of php to vbblog works is changing

line 24~26 to
Code:

// ######################### 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
Code:

    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

Quote:

Originally Posted by ZiG (Post 1438553)
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

Quote:

Originally Posted by Nikke (Post 1452856)
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

Quote:

Originally Posted by beduino (Post 1451326)
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


All times are GMT. The time now is 07:53 PM.

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.03128 seconds
  • Memory Usage 1,792KB
  • 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
  • (6)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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