vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - [WIDGET] Slider (https://vborg.vbsupport.ru/showthread.php?t=233909)

cykelmyggen 05-24-2010 09:29 AM

Just a noob-question: how do you enter the forum IDs in slider.php. Replace numbers inside the array with forum iDs or...? Tried a variety of solutions, but no one seems to work.
Code:

$forumid                                = array(184,149);                        // Set forum IDs here.

Preech 05-24-2010 10:08 AM

That should be it. I don't use this one anymore, I use the other one. But that looks about right.

Jojonas 05-24-2010 07:58 PM

I want to use it with vbadvanced cmps like there -> http://www.freefrag.com/ but i don't know how to do this. Can me help somebody?

Jonas

madrtr 05-26-2010 08:56 AM

hey guys, just having one problem with the slider, its not showing the title in the slide.

www.myclan.com.au/index


i might be just blind, but its my first time ever working with any sort of code, could someone please point me in the right direction please.

wickedstangs 06-06-2010 12:54 PM

Very Nice mod

Reef Man 06-18-2010 08:47 PM

Hi,
Is there any way to install this on a vbadvanced module?

Thanks.

Reeve of shinra 06-18-2010 10:07 PM

Reef Man,

Didn't test it but you can create a new php module in vbadvance and add this part of the code into it. The rest of hte instructions should be the same.

PHP Code:

ob_start(); 
echo 
'<div>';
echo 
'<center>';
require_once  
'./clientscript/slider/slider.php';
echo 
'</center>';
echo 
'</div>';
$output=ob_get_contents(); 
ob_end_clean(); 


airheadairbrush 06-21-2010 07:23 PM

any one gotten this to work with vb cms yet?
so it pulls from new articles in the cms

emath 06-22-2010 09:28 AM

works with 4.0.4 ??

Reef Man 06-23-2010 01:45 PM

Yes it works with 4.0.4.

Quote:

Reef Man,

Didn't test it but you can create a new php module in vbadvance and add this part of the code into it. The rest of hte instructions should be the same.
Hi Reeve of shinra,

I am confused. I am trying to create a php module on vbadvanced, but where do I need to place the code? What file I need to include and where? any module parent?

Sorry, I am not an expert coder. Thanks in advance for your help !

LCN2007 06-24-2010 01:31 PM

Is this able to be made fluid?

Chalex4 06-27-2010 10:52 AM

On a test version of my website www.atkcommunity.com I am trying out your content slider and have ALMOST made it completely work on my vBadvanced homepage :).

However, I am having the problem that when the homepage loads, all of the images for the different slides appear beneath each other:

http://img819.imageshack.us/img819/6184/94774237.png

Once the site has finished loading, it appears as it's supposed to:

https://vborg.vbsupport.ru/

I would really appreciate any help you guys can give me that would eliminate this problem. This may mean making it so that the images are loaded progressively, but I wouldn't know how to do this. Maybe just ensuring that the images are always contained in the box would work?

Thanks!

wickedstangs 06-28-2010 12:55 AM

how do you set permissions? When I am logged off, I can't see the images on the my site. When I log in I can see everything.

Reef Man 06-28-2010 07:00 PM

Quote:

Originally Posted by Chalex4 (Post 2060413)
On a test version of my website www.atkcommunity.com I am trying out your content slider and have ALMOST made it completely work on my vBadvanced homepage :).

However, I am having the problem that when the homepage loads, all of the images for the different slides appear beneath each other:

http://img295.imageshack.us/img295/4355/63412485.png

Once the site has finished loading, it appears as it's supposed to:

http://img192.imageshack.us/img192/2985/89653240.png

I would really appreciate any help you guys can give me that would eliminate this problem. This may mean making it so that the images are loaded progressively, but I wouldn't know how to do this. Maybe just ensuring that the images are always contained in the box would work?

Thanks!

where do you have it? I can not see it.

Chalex4 06-28-2010 07:35 PM

Quote:

Originally Posted by Reef Man (Post 2061273)
where do you have it? I can not see it.

Sorry, it's only viewable for me right now because it's broken!

If you want to try and help me out then just sign up and I'll be happy to make it visable for you :).

Chalex4 06-28-2010 07:39 PM

I looked at your slider on http://www.acuarios-marinos.com and it looks like you have the same problem. Luckily your forum isn't transparent though so you can only see a very small portion of the next image. Anyway, if you have any ideas I'd love to hear them!


EDIT: Sorry for the double post

JMEWLS` 07-09-2010 08:04 AM

<a href="http://www.nbadimensions.net" target="_blank">www.nbadimensions.net</a>

The slider isn't working on internet explorer. You can't chose the slide. How do I fix this?

JMEWLS` 07-09-2010 01:55 PM

Code:

<style>
#featured{
        width:441px;
        padding-right:145px;
        padding-left:10px;
        padding-bottom:10px;
        padding-top:10px;
        position:relative;
        height:250px;
        background:#F2F2F2;
}
#featured ul.ui-tabs-nav{
        position:absolute;
        left:465px;
        top: 10px;
        list-style:none;
        padding:0; margin:0;
        width:123px;
        height:70px;
        margin:2px 5px;
}
#featured ul.ui-tabs-nav li{
        padding:2px;
        background-color:#F2F2F2;
        font-size:12px;
        margin:2px 5px;
}
#featured ul.ui-tabs-nav li img{
        float:left; margin:2px 5px;
        background:#F2F2F2;
        padding:2px;
        border:1px solid #eee;
}
#featured ul.ui-tabs-nav li span{
        font-size:9px; font-family:Arial, Helvetica, sans-serif;
        line-height:18px;
    border-color: #000;
}
#featured li.ui-tabs-nav-item a{
        display:block;
        height:60px;
        color:#333;  background:#fff;
        line-height:20px;
}
#featured li.ui-tabs-nav-item a:hover{
        background:#C3222A;
}

#featured ul.ui-tabs-nav li.ui-tabs-selected a{
        background:#2D6294;
}
#featured .ui-tabs-panel{
        width:450px;
    height:250px;
        background:#999; position:relative;
}
#featured .ui-tabs-panel .info{
        position:absolute;
        top:180px; left:0;
        height:70px;
        background: url('clientscript/slider/images/transparent-bg.png');
    color:#fff;
}
#featured .info h2{
        font-size:18px; font-family:Arial, Helvetica, sans-serif;
        color:#fff; padding:5px; margin:0;
        overflow:hidden;
}
#featured .info p{
        margin:0 5px;
        font-family:Arial, Helvetica, sans-serif; font-size:11px;
        line-height:15px; color:#f0f0f0;
}
#featured .info a{
        text-decoration:none;
        color:#fff;
}
#featured .info a:hover{
        text-decoration:underline;
}
#featured .ui-tabs-hide{
        display:none;
}
</style>
<!-- jQuery - Do you already load this javascript?  (i.e. cometchat) -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>

<!-- Rotating Code -->
<script type="text/javascript">
    $(document).ready(function(){
        $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
    });
</script>
<!-- / Rotating Code -->
<?php
global $db,$vbulletin,$sess, $std, $INFO, $vboptions, $session, $bbcode;
// vBulletin: Parse BBCode
if (!is_object($bbcode_parser)){
        require_once('../forums/includes/class_bbcode.php');
        $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}

$forumid                                = array(79);                        // Set forum IDs here.
$limit                                        = '4';                                // Limit the displayed slides
$chars                                        = 120;                        // Character limit for the slide text, e.g. 100 is 100 characters limit.
$words                                        = 20;                        // Word limit for the slide text, e.g. 20 is 20 words limit
/* ------------------------------ NOTHING TO CHANGE BELOW THIS LINE ------------------------------ */


// Start loop
$forumid = implode(',',$forumid);
$getnews = $db->query_read("SELECT threadid from ".TABLE_PREFIX."thread WHERE attach !='0' AND forumid in($forumid) ORDER by sticky DESC, threadid DESC LIMIT $limit");
while ($news = $db->fetch_array($getnews)) {
        $myid[]=$news['threadid'];
}
$tabhtml="";
$contenthtml="";
$div_id = 1;

if ($myid) {
foreach ($myid as $threadid) {
$getpics = $db->query_read("SELECT t.threadid as tid, t.title as title,t.replycount as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.forumid as forumid,f.title as forum from ".TABLE_PREFIX."thread as t
        LEFT JOIN ".TABLE_PREFIX."post as p on(t.firstpostid=p.postid)
        LEFT JOIN ".TABLE_PREFIX."attachment as a on(a.contentid=p.postid)
        LEFT JOIN ".TABLE_PREFIX."forum as f on(t.forumid=f.forumid)
        where t.threadid='$threadid'
        ORDER BY attach DESC
        LIMIT 1");

while ($pic = $db->fetch_array($getpics)) {
$replies=$pic['rcount'];
if ($replies=='1') {
$update="- (1 update)";
} elseif ($replies>'1') {
$update="- ($replies updates)";
} else {
$update="";
}

$pic['pagetext'] = $bbcode_parser->do_parse($pic['pagetext'],false,false,false,false,false,false);
$link = "../forums/showthread.php?t=".$threadid."";
$imagepath = "../forums/attachment.php?attachmentid=".$pic['attach'];
$titleContent = ucwords($pic['title']);
$introtext = $pic['pagetext'];
$pattern = '~\[([^\]]+?)(=[^\]]+?)?\](.+?)\[/\1\]~';
preg_replace($pattern, ' ' , $introtext);
$OpenBrace = '\[';
$CloseBrace = '\]';
$NotACloseBrace = "[^{$CloseBrace}]";
$Multiple = '+?';
$Optional = '?';
$Anything = "(.{$Multiple})";
$StartTag = "{$OpenBrace}({$NotACloseBrace}{$Multiple})(={$NotACloseBrace}{$Multiple}){$Optional}{$CloseBrace}";
$EndTag = "{$OpenBrace}/\\1{$CloseBrace}";
$FullPattern = "~{$StartTag}{$Anything}{$EndTag}~";
$String = $introtext;
$String = preg_replace($FullPattern, '', $String);
$introtext = $String;

 // clean images
$introtext = preg_replace("/<img.+?>/", "", $introtext);
 // HTML cleanup
if ($striptags) {
$introtext = strip_tags($introtext, $allowed_tags);
}
// if character limitation is defined
 if ($chars) {
 if(function_exists("mb_string")) {
 $introtext = mb_substr($introtext, 0, $chars).'...';
} else {
 $introtext = substr($introtext, 0, $chars).'...';
}
}


if(function_exists("mb_string")) {
 $titleContent = mb_substr($titleContent, 0, 40).'...';
} else {
 $titleContent = substr($titleContent, 0, 40).'...';
}

// if word limitation is defined
if ($words) {
$word_arr = str_word_count($introtext, 2);
$c = 0;
foreach ($word_arr AS $k => $v) {
if ($c == $words) {
if(function_exists("mb_string")) {
$introtext = mb_substr($introtext, 0, $k).'...';
} else {
$introtext = substr($introtext, 0, $k).'...';
}
break;
}
$c++;
}
}
$introtext = unhtmlspecialchars($introtext, true);

$tabhtml .= "<li class='ui-tabs-nav-item' id='nav-fragment-".$div_id."'><a href='#fragment-".$div_id."'>";
$tabhtml .="<img src='".$imagepath."' height='56px' width='100px' alt='' />";

$centerhtml .="<div id='fragment-".$div_id."' class='ui-tabs-panel' style=''>";
$centerhtml .="<img src='".$imagepath."' height='254px' width='450px' alt=''/>";
$centerhtml .="<div class='info'>";
$centerhtml .="<h2><a href='".$link."'>".$titleContent."</a></h2>";
$centerhtml .="<p>".$introtext."</p></div></div>";


$div_id++;
}
}

$db->free_result($getpics);
unset($pic);
$db->free_result($getnews);
unset($news);
// End loop

$tabhtml = "<div id=\"featured\"><ul class=\"ui-tabs-nav\">".$tabhtml."</ul>";

echo $tabhtml.$centerhtml."</div>";
}
?>

That is my current code, it's also ruining my sidebar. Can someone please help me correct the code, I'm not good with .php.

JMEWLS` 07-09-2010 11:53 PM

Anyone? I'm keen to get this done ASAP.

JMEWLS` 07-11-2010 11:53 PM

:(...

albatarni 07-12-2010 07:13 PM

when i went to your page, my antivirus detect a virus from your website and here is the info :

http://demo.webdeveloperplus.com/fea...ontent-slider/

(Infected Link) on : http://webdeveloperplus.com/jquery/f...ing-jquery-ui/

The requested URL could not be retrieved

While trying to retrieve the URL:

http://webdeveloperplus.com/jquery/
featured-content-slider-using-jquery-ui/

The following threat was encountered:

The requested object is INFECTED with the following viruses: HEUR:Trojan.Script.Iframer

Flyte 07-13-2010 12:30 AM

Okay... questions:
This mod will automatically pull images from specified forums?
Will it work with cms content as well?
We have downloaded it and can't get it to work with our 4.0.4 forum. Is there a known issue with 4.0.4?

Thanks in advance!

ss20 07-13-2010 09:07 AM

I have an error
Fatal error: Class 'vBulletinHook' not found in /var/www/xxxxxxxx/includes/class_bbcode.php on line 3041

Can someone help

JMEWLS` 07-13-2010 09:19 AM

Quote:

Originally Posted by JMEWLS` (Post 2066851)
Code:

<style>
#featured{
        width:441px;
        padding-right:145px;
        padding-left:10px;
        padding-bottom:10px;
        padding-top:10px;
        position:relative;
        height:250px;
        background:#F2F2F2;
}
#featured ul.ui-tabs-nav{
        position:absolute;
        left:465px;
        top: 10px;
        list-style:none;
        padding:0; margin:0;
        width:123px;
        height:70px;
        margin:2px 5px;
}
#featured ul.ui-tabs-nav li{
        padding:2px;
        background-color:#F2F2F2;
        font-size:12px;
        margin:2px 5px;
}
#featured ul.ui-tabs-nav li img{
        float:left; margin:2px 5px;
        background:#F2F2F2;
        padding:2px;
        border:1px solid #eee;
}
#featured ul.ui-tabs-nav li span{
        font-size:9px; font-family:Arial, Helvetica, sans-serif;
        line-height:18px;
    border-color: #000;
}
#featured li.ui-tabs-nav-item a{
        display:block;
        height:60px;
        color:#333;  background:#fff;
        line-height:20px;
}
#featured li.ui-tabs-nav-item a:hover{
        background:#C3222A;
}

#featured ul.ui-tabs-nav li.ui-tabs-selected a{
        background:#2D6294;
}
#featured .ui-tabs-panel{
        width:450px;
    height:250px;
        background:#999; position:relative;
}
#featured .ui-tabs-panel .info{
        position:absolute;
        top:180px; left:0;
        height:70px;
        background: url('clientscript/slider/images/transparent-bg.png');
    color:#fff;
}
#featured .info h2{
        font-size:18px; font-family:Arial, Helvetica, sans-serif;
        color:#fff; padding:5px; margin:0;
        overflow:hidden;
}
#featured .info p{
        margin:0 5px;
        font-family:Arial, Helvetica, sans-serif; font-size:11px;
        line-height:15px; color:#f0f0f0;
}
#featured .info a{
        text-decoration:none;
        color:#fff;
}
#featured .info a:hover{
        text-decoration:underline;
}
#featured .ui-tabs-hide{
        display:none;
}
</style>
<!-- jQuery - Do you already load this javascript?  (i.e. cometchat) -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>

<!-- Rotating Code -->
<script type="text/javascript">
    $(document).ready(function(){
        $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
    });
</script>
<!-- / Rotating Code -->
<?php
global $db,$vbulletin,$sess, $std, $INFO, $vboptions, $session, $bbcode;
// vBulletin: Parse BBCode
if (!is_object($bbcode_parser)){
        require_once('../forums/includes/class_bbcode.php');
        $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
}

$forumid                                = array(79);                        // Set forum IDs here.
$limit                                        = '4';                                // Limit the displayed slides
$chars                                        = 120;                        // Character limit for the slide text, e.g. 100 is 100 characters limit.
$words                                        = 20;                        // Word limit for the slide text, e.g. 20 is 20 words limit
/* ------------------------------ NOTHING TO CHANGE BELOW THIS LINE ------------------------------ */


// Start loop
$forumid = implode(',',$forumid);
$getnews = $db->query_read("SELECT threadid from ".TABLE_PREFIX."thread WHERE attach !='0' AND forumid in($forumid) ORDER by sticky DESC, threadid DESC LIMIT $limit");
while ($news = $db->fetch_array($getnews)) {
        $myid[]=$news['threadid'];
}
$tabhtml="";
$contenthtml="";
$div_id = 1;

if ($myid) {
foreach ($myid as $threadid) {
$getpics = $db->query_read("SELECT t.threadid as tid, t.title as title,t.replycount as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.forumid as forumid,f.title as forum from ".TABLE_PREFIX."thread as t
        LEFT JOIN ".TABLE_PREFIX."post as p on(t.firstpostid=p.postid)
        LEFT JOIN ".TABLE_PREFIX."attachment as a on(a.contentid=p.postid)
        LEFT JOIN ".TABLE_PREFIX."forum as f on(t.forumid=f.forumid)
        where t.threadid='$threadid'
        ORDER BY attach DESC
        LIMIT 1");

while ($pic = $db->fetch_array($getpics)) {
$replies=$pic['rcount'];
if ($replies=='1') {
$update="- (1 update)";
} elseif ($replies>'1') {
$update="- ($replies updates)";
} else {
$update="";
}

$pic['pagetext'] = $bbcode_parser->do_parse($pic['pagetext'],false,false,false,false,false,false);
$link = "../forums/showthread.php?t=".$threadid."";
$imagepath = "../forums/attachment.php?attachmentid=".$pic['attach'];
$titleContent = ucwords($pic['title']);
$introtext = $pic['pagetext'];
$pattern = '~\[([^\]]+?)(=[^\]]+?)?\](.+?)\[/\1\]~';
preg_replace($pattern, ' ' , $introtext);
$OpenBrace = '\[';
$CloseBrace = '\]';
$NotACloseBrace = "[^{$CloseBrace}]";
$Multiple = '+?';
$Optional = '?';
$Anything = "(.{$Multiple})";
$StartTag = "{$OpenBrace}({$NotACloseBrace}{$Multiple})(={$NotACloseBrace}{$Multiple}){$Optional}{$CloseBrace}";
$EndTag = "{$OpenBrace}/\\1{$CloseBrace}";
$FullPattern = "~{$StartTag}{$Anything}{$EndTag}~";
$String = $introtext;
$String = preg_replace($FullPattern, '', $String);
$introtext = $String;

 // clean images
$introtext = preg_replace("/<img.+?>/", "", $introtext);
 // HTML cleanup
if ($striptags) {
$introtext = strip_tags($introtext, $allowed_tags);
}
// if character limitation is defined
 if ($chars) {
 if(function_exists("mb_string")) {
 $introtext = mb_substr($introtext, 0, $chars).'...';
} else {
 $introtext = substr($introtext, 0, $chars).'...';
}
}


if(function_exists("mb_string")) {
 $titleContent = mb_substr($titleContent, 0, 40).'...';
} else {
 $titleContent = substr($titleContent, 0, 40).'...';
}

// if word limitation is defined
if ($words) {
$word_arr = str_word_count($introtext, 2);
$c = 0;
foreach ($word_arr AS $k => $v) {
if ($c == $words) {
if(function_exists("mb_string")) {
$introtext = mb_substr($introtext, 0, $k).'...';
} else {
$introtext = substr($introtext, 0, $k).'...';
}
break;
}
$c++;
}
}
$introtext = unhtmlspecialchars($introtext, true);

$tabhtml .= "<li class='ui-tabs-nav-item' id='nav-fragment-".$div_id."'><a href='#fragment-".$div_id."'>";
$tabhtml .="<img src='".$imagepath."' height='56px' width='100px' alt='' />";

$centerhtml .="<div id='fragment-".$div_id."' class='ui-tabs-panel' style=''>";
$centerhtml .="<img src='".$imagepath."' height='254px' width='450px' alt=''/>";
$centerhtml .="<div class='info'>";
$centerhtml .="<h2><a href='".$link."'>".$titleContent."</a></h2>";
$centerhtml .="<p>".$introtext."</p></div></div>";


$div_id++;
}
}

$db->free_result($getpics);
unset($pic);
$db->free_result($getnews);
unset($news);
// End loop

$tabhtml = "<div id=\"featured\"><ul class=\"ui-tabs-nav\">".$tabhtml."</ul>";

echo $tabhtml.$centerhtml."</div>";
}
?>

That is my current code, it's also ruining my sidebar. Can someone please help me correct the code, I'm not good with .php.

Anyone?

ss20 07-13-2010 09:22 AM

Quote:

if (!is_object($bbcode_parser)){
require_once('../forums/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
As I understand you need to put the full path in line
('../forums/includes/class_bbcode.php');
For example I have require_once('/var/www/xxxxxxxx/includes/class_bbcode.php');

Flyte 07-15-2010 05:44 PM

I am having trouble pulling the image. And it is only pulling one thread.

PHP Code:

<style>
#featured{
    width:386px;
    padding-right:100px;
    position:relative;
    border:5px solid #ccc;
    height:250px;
    background:#fff;
        margin-top:7px;
}
#featured ul.ui-tabs-nav{
    position:absolute;
    top:0;
    left:399px;
    list-style:none;
    padding:0;
    margin:0;
    width:86px;
}
#featured ul.ui-tabs-nav li{ 
    padding:1px 0; padding-left:2px;  
    font-size:12px; 
    color:#666; 
}
#featured ul.ui-tabs-nav li img{ 
    float:left; margin:1px 1px; 
    background:#fff; 
    padding:0px; 
    border:1px solid #eee;
}
#featured ul.ui-tabs-nav li span{ 
    font-size:11px; font-family:Verdana; 
    line-height:18px; 
}
#featured li.ui-tabs-nav-item a{ 
    display:block; 
    height:54px; 
    color:#333;  background:#fff; 
    margin-bottom:9px;
    line-height:20px;
}
#featured li.ui-tabs-nav-item a:hover{ 
    background: #F00; 
}
#featured li.ui-tabs-selected{ 
    /*background:url('images/selected-item.gif') top left no-repeat;  */
}
#featured ul.ui-tabs-nav li.ui-tabs-selected a{ 
    background:#333; 
}
#featured .ui-tabs-panel{ 
    width:400px; height:250px; 
    background:#999; position:relative;
}
#featured .ui-tabs-panel .info{ 
    position:absolute; 
    top:180px; left:0; 
    height:70px; 
    background: url('http://theriderlounge.com/mx/images/jq/transparent-bg.png'); 
}
#featured .info h2{ 
    font-size:18px; font-family:Georgia, serif; 
    color:#fff; padding:5px; margin:0;
    overflow:hidden; 
}
#featured .info p{ 
    margin:0 5px; 
    font-family:Verdana; font-size:11px; 
    line-height:15px; color:#f0f0f0;
}
#featured .info a{ 
    text-decoration:none; 
    color:#fff; 
}
#featured .info a:hover{ 
    text-decoration:underline; 
}
#featured .ui-tabs-hide{ 
    display:none; 
}


</style>
<!-- jQuery - Do you already load this javascript?  (i.e. cometchat) -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>

<!-- Rotating Code -->
<script type="text/javascript">
    $(document).ready(function(){
        $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
    });
</script>
<!-- / Rotating Code -->
<?php
global $db,$vbulletin,$sess$std$INFO$vboptions$session$bbcode;
// vBulletin: Parse BBCode
if (!is_object($bbcode_parser)){
    require_once(
'includes/class_bbcode.php');
    
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
}

$forumid                = array(2,22,11,4);            // Set forum IDs here.
$limit                    '2';                // Limit the displayed slides
$chars                    120;            // Character limit for the slide text, e.g. 100 is 100 characters limit.
$words                    20;            // Word limit for the slide text, e.g. 20 is 20 words limit
/* ------------------------------ NOTHING TO CHANGE BELOW THIS LINE ------------------------------ */


// Start loop
$forumid implode(',',$forumid);
$getnews $db->query_read("SELECT threadid from ".TABLE_PREFIX."thread WHERE attach !='0' AND forumid in($forumid) ORDER by sticky DESC, threadid DESC LIMIT $limit");
while (
$news $db->fetch_array($getnews)) {
    
$myid[]=$news['threadid'];
}
$tabhtml="";
$contenthtml="";
$div_id 1;

if (
$myid) {
foreach (
$myid as $threadid) {
$getpics $db->query_read("SELECT t.threadid as tid, t.title as title,t.replycount as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.forumid as forumid,f.title as forum from ".TABLE_PREFIX."thread as t
    LEFT JOIN "
.TABLE_PREFIX."post as p on(t.firstpostid=p.postid)
    LEFT JOIN "
.TABLE_PREFIX."attachment as a on(a.contentid=p.postid)
    LEFT JOIN "
.TABLE_PREFIX."forum as f on(t.forumid=f.forumid)
    where t.threadid='
$threadid'
    ORDER BY attach DESC
    LIMIT 1"
);

while (
$pic $db->fetch_array($getpics)) {
$replies=$pic['rcount'];
if (
$replies=='1') {
$update="- (1 update)";
} elseif (
$replies>'1') {
$update="- ($replies updates)";
} else {
$update="";
}

$pic['pagetext'] = $bbcode_parser->do_parse($pic['pagetext'],false,false,false,false,false,false);
$link "../showthread.php?t=".$threadid."";
$imagepath "../attachment.php?attachmentid=".$pic['attach'];
$titleContent ucwords($pic['title']);
$introtext $pic['pagetext'];
$pattern '~\[([^\]]+?)(=[^\]]+?)?\](.+?)\[/\1\]~'
preg_replace($pattern' ' $introtext); 
$OpenBrace '\['
$CloseBrace '\]'
$NotACloseBrace "[^{$CloseBrace}]"
$Multiple '+?'
$Optional '?'
$Anything "(.{$Multiple})"
$StartTag "{$OpenBrace}({$NotACloseBrace}{$Multiple})(={$NotACloseBrace}{$Multiple}){$Optional}{$CloseBrace}"
$EndTag "{$OpenBrace}/\\1{$CloseBrace}"
$FullPattern "~{$StartTag}{$Anything}{$EndTag}~"
$String $introtext;
$String preg_replace($FullPattern''$String); 
$introtext $String;

 
// clean images
$introtext preg_replace("/<img.+?>/"""$introtext);
 
// HTML cleanup
if ($striptags) {
$introtext strip_tags($introtext$allowed_tags);
}
// if character limitation is defined
 
if ($chars) {
 if(
function_exists("mb_string")) {
 
$introtext mb_substr($introtext0$chars).'...';
} else {
 
$introtext substr($introtext0$chars).'...';
}
}


if(
function_exists("mb_string")) {
 
$titleContent mb_substr($titleContent030).'...';
} else {
 
$titleContent substr($titleContent030).'...';
}

// if word limitation is defined
if ($words) {
$word_arr str_word_count($introtext2);
$c 0;
foreach (
$word_arr AS $k => $v) {
if (
$c == $words) {
if(
function_exists("mb_string")) {
$introtext mb_substr($introtext0$k).'...';
} else {
$introtext substr($introtext0$k).'...';
}
break;
}
$c++;
}
}
$introtext unhtmlspecialchars($introtexttrue);

$tabhtml .= "<li class='ui-tabs-nav-item' id='nav-fragment-".$div_id."'><a href='#fragment-".$div_id."'>";
$tabhtml .="<img src='".$imagepath."' height='25px' width='40px' alt='' /></a></li>";


$centerhtml .="<div id='fragment-".$div_id."' class='ui-tabs-panel' style=''>";
$centerhtml .="<img src='".$imagepath."' alt=''/>";
$centerhtml .="<div class='info'>";
$centerhtml .="<h2><a href='".$link."'>".$titleContent."</a></h2>";
$centerhtml .="<p>".$introtext."</p></div></div>";


$div_id++;
}
}

$db->free_result($getpics);
unset(
$pic);
$db->free_result($getnews);
unset(
$news);
// End loop

$tabhtml "<div id=\"featured\"><ul class=\"ui-tabs-nav\">".$tabhtml."</ul>";

echo 
$tabhtml.$centerhtml."</div>";
}
?>

Check out our forum home page and you can see that it only shows one thread and does not pull the image.

http://theriderlounge.com/mx/forum/content.php

Link to the thread:

http://theriderlounge.com/mx/forum/s...ndar-Cover-Gir

thanks!

JMEWLS` 07-16-2010 03:26 AM

Put the attachment on the initial post and say what you see.

Flyte 07-16-2010 03:40 AM

Quote:

Originally Posted by JMEWLS` (Post 2069839)
Put the attachment on the initial post and say what you see.

okay, i did that

robster1225 07-20-2010 02:54 PM

Is there something similar to this that will show CMS articles?

rares.stanescu 08-03-2010 06:32 AM

Quote:

Originally Posted by robster1225 (Post 2072045)
Is there something similar to this that will show CMS articles?

I would be interested in this feature too

bandare 08-04-2010 04:02 PM

Quote:

Originally Posted by robster1225 (Post 2072045)
Is there something similar to this that will show CMS articles?

ditto... have been after this since the CMS came out. I think it's something that should be an integral part of todays CMS!

CFodder 08-05-2010 09:48 AM

Quote:

Originally Posted by ss20 (Post 2068457)
As I understand you need to put the full path in line
('../forums/includes/class_bbcode.php');
For example I have require_once('/var/www/xxxxxxxx/includes/class_bbcode.php');

Have done that, now getting error:

Quote:

Fatal error: Class 'vBulletinHook' not found in / ... /includes/class_bbcode.php on line 2982
Anyone else come across this and know how to fix it?

KevinL 08-05-2010 11:07 AM

Quote:

Originally Posted by CFodder (Post 2079544)
Have done that, now getting error:



Anyone else come across this and know how to fix it?


Remove the edit from the bbcode and try that

nicutdk 08-09-2010 05:49 PM

Hi,

it is possible to put CMS' articles in the slide instead of forum posts?

Best Regards,

ilvikingo 08-10-2010 09:40 AM

hi can I use this for the article in CMS?

bandare 08-10-2010 06:06 PM

I have no idea why these sliders are not being made so they do work with CMS. Take www.vbcover.com - a really superb product but only works with forums and not cms. I'd buy the vbcover slider if it worked with the cms well.....

Hope it can be done.

nicutdk 08-11-2010 11:23 AM

many, many applications works just with forum not with CMS.

I bought VB4 for CMS not for forum. Unfortunately IPB at ~ the same money offers much more.

Xencored 08-14-2010 10:46 AM

Awesome i like the idea
only problem ive found is that my images are WAY to big for the sliders box :(

basilrath 08-14-2010 11:43 AM

I agree ....... tried it but images big ........

Its time until a slider pulls from threads etc and cms

Neptun 08-14-2010 06:19 PM

Quote:

Originally Posted by robster1225 (Post 2072045)
Is there something similar to this that will show CMS articles?

i hope there will be a possibility to use this with the cms - would be great - a uptodate cms should work with something like this !


All times are GMT. The time now is 12:58 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.01762 seconds
  • Memory Usage 1,971KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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