Thread: vBulletin CMS Widgets - United-Forum Nivo Slider Widget
View Single Post
  #120  
Old 08-10-2011, 09:11 PM
Mooff Mooff is offline
 
Join Date: Mar 2010
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Aramist

If you do not want the value sorting function you can remove the whole sorting part and therefore gain a bit in performance (not that much, but well a bunch of calculations are unnecessary then).
(untested!)

search for:
Code:
    /* my version of sorting the articles via relevance - i'll keep it in case someone is interested*/
    while($article = vB::$db->fetch_array($article_get))
    {
        $article['value'] = ( 5 - ($time - $article['publishdate'] ) / 86400 ) * ( 5 - ($time - $article['publishdate'] ) / 86400 ) * ( 5 - ($time - $article['publishdate'] ) / 86400 ) + (10 * $article['replycount']);
        $database_articles[] = $article;        
    }
    
    foreach($database_articles as $c => $key)
    {
        $sort_value[] = $key['value'];
    }
    
    array_multisort($sort_value, SORT_DESC, $database_articles);    
    
    //
    $i = 0;
    $section_array = array();
    $featured_articles = array();
	
    foreach($database_articles AS $article)
    {
replace with
Code:
    $i = 0;
    $section_array = array();
    $featured_articles = array();
	
    while($article = vB::$db->fetch_array($article_get))
    {

@ Loversama
I do not know what that mod does in terms of database changes and i do not have it installed and i cannot install it on our board, nor can i install it in our testboard (there we have 3 different unreleased projects right now which i can't risk to compromise).

@ Wordplay
Working with forumposts would need a database query rewrite.
That beeing said. What can be done is showing title and description of threads and then using images based on the forum they are in. What can't be done is searching through the pagetext to find an image suited for the slider.
(Well it can, but i can't debug that and it does need a lot of thinking and work. Work which will have no use on our board. Sorry.)
As for article images not beeing suited for the slider. We do face the same problem on our board. Therefore we are using a highly customized version which does account for our needs. Like using section and category based images as fallbacks and resizeing images only for images which are at least 400px wide and have a width/height ratio between 2.5 and 2.8.
Options i can not set as default for everyone. But as said in the first post, if one does need something fancy i might be able to help with some custom code for your board. No promises though. And i need to know exactly what one does want. Exactly. Like explaining it to your grandma exactly
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01451 seconds
  • Memory Usage 1,768KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete