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)
-   -   Portal Software - Define Order Of News Shown With Frontpage Slideshow (https://vborg.vbsupport.ru/showthread.php?t=164107)

SBlueman 12-01-2007 10:00 PM

Define Order Of News Shown With Frontpage Slideshow
 
I have been using this on my site for a while now and I love how I can sort the order in which the news is displayed. I felt it would be a cool thing to share with everyone, so here goes:

First, you'll need to have Joomblaworks "FrontPage Slideshow" installed on your site. (this is NOT a free modification, and is needed to make this work)

Then you'll need to install this modification: vb_Cement

Now, open the "mod_fpslideshow.php" file for the Frontpage Slideshow. Search for "sticky" (only one instance in the entire file) and replace with "threadweight".

Old line of code:
Quote:

$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");
New line of code:
Quote:

$getnews = $db->query_read("SELECT threadid from ".TABLE_PREFIX."thread WHERE attach !='0' AND forumid in($forumid) ORDER by threadweight DESC, threadid DESC LIMIT $limit");
Now use the vb_Cement modification to arrange your sticky news items in the forum you are pulling the news from. Enjoy!

DEMO:
http://gridironfans.com/

Screenshot:

http://img84.imageshack.us/img84/5356/slideshowuz7.jpg

Subah 12-02-2007 08:40 AM

Cool , Thanks :)

Lionel 12-02-2007 02:06 PM

The vbcement link is not working

SBlueman 12-02-2007 02:17 PM

And fixed, thank you for catching that.

ChurchMedia 12-02-2007 05:56 PM

Excellent! I'm going to install ASAP.

yahoooh 12-02-2007 08:41 PM

can u make module like it for vbadvanced cmps ?

SBlueman 12-02-2007 08:52 PM

The Frontpage Slideshow mod IS the mod that would add the module for vbadvanced. It is not free though.

This modification is just an enhancement to the Slideshow modification for people who use/own it.

Lionel 12-02-2007 09:01 PM

You could also look at this one with more options and no queries

SBlueman 12-02-2007 09:15 PM

Will this modification work with your vBslideshow?

Lionel 12-02-2007 09:28 PM

It's just a matter of changing the ORDER BY. In fact, I am going to add that option in admincp where you will define the order by


All times are GMT. The time now is 09:20 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.01187 seconds
  • Memory Usage 1,728KB
  • 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_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
  • (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