vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   End-User Options - Recently Viewed Threads 1.0.0 (https://vborg.vbsupport.ru/showthread.php?t=192561)

Gio~Logist 07-15-2009 01:38 AM

Tested and working on 3.8 :up:

inciarco 10-19-2009 03:48 AM

A Small but Important Bug:

When the Thread's Title is Too Long the Search Menu With Goes Too Long Too, even Occupying the Screen Width. :confused:

How can the Thread's Names be Limited to xxx Characters? :confused:

My Best Regards.

:)

inciarco 10-19-2009 04:22 AM

I Experienced a Little with the Code of One of the Plugins and I Found the Way; perhaps you can Include it in the Next Update of your Mod with an Option in the Control Panel for Admins to Set it:

I added the Following Code on the Plugin "Recently Viewed Threads - Browse Recently Viewed", by

Code:

$recent_thread['title'] = substr($recent_thread['title'], 0, 30);

if (strlen($recent_thread['title'])>=30)
{
$recent_thread['title'] .= '...';
}

You just have to Change the 30 to the Number of Characters You'd Like the Text to be Limited to.

so that Plugin would be:

Code:

if($vbulletin->options['recent_threadviews_enabled'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['recent_threadviews'])){

        $get_recent_threadviews = $vbulletin->db->query_read("SELECT threadid, title
                                                                                                                FROM " . TABLE_PREFIX . "thread
                                                                                                                WHERE threadid IN (" . $vbulletin->userinfo['recent_threadviews'] . ")
                                                                                                                ORDER BY FIELD(threadid," . $vbulletin->userinfo['recent_threadviews'] . ") DESC
                                                                                                        ");
               
       
        while($recent_thread = $vbulletin->db->fetch_array($get_recent_threadviews)){
       


$recent_thread['title'] = substr($recent_thread['title'], 0, 30);

if (strlen($recent_thread['title'])>=30)
{
$recent_thread['title'] .= '...';
}



                //$recent_thread['title'] = fetch_trimmed_title(fetch_censored_text($lastpostinfo['lastthread']));
                eval('$recently_viewed_threads .= "' . fetch_template('recent_threadviews_navbit') . '";');

        }
       
        eval('$template_hook[navbar_search_menu] .= "' . fetch_template('recent_threadviews_nav') . '";');       
       
}

And that's it.

My Best Regards.

:)


All times are GMT. The time now is 01:56 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.02025 seconds
  • Memory Usage 1,724KB
  • 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
  • (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
  • (3)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