Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2008, 06:29 AM
imcoach imcoach is offline
 
Join Date: Apr 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Widen Smiliepopup Window

Hi!

Is there a way to expand the smiliepop window? I just uploaded some wider then average smilies and now one needs to scroll to see the right column..

Thx.

-Matt
Reply With Quote
  #2  
Old 11-25-2008, 12:01 PM
k111 k111 is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[edit] http://www.vbulletin.com/forum/showthread.php?t=102052

found it..
Reply With Quote
  #3  
Old 11-25-2008, 12:27 PM
ReCom ReCom is offline
 
Join Date: Mar 2008
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After widening the smilie popup window, you might want to change the number of smilies per row to fully utilize the increased width better. Here's how:

(warning: this requires modifying a core vbulletin file, an action that is best avoided unless necessary)

0. Decide how many smilies to show per row. Let say you want 5 smilies per row.

1. Customize template smiliepopup_straggler into:
HTML Code:
<td class="$bgclass">$smiliehtml</td>
<td class="$bgclass" colspan="$remainingcols">$smilie[text]</td>
2. Open misc.php and find the following code portion:
PHP Code:
    foreach ($smcache AS $category => $smilies)
    {
        if (
sizeof($bits) == 1)
        {
            eval(
'$smiliecells = "' fetch_template('smiliepopup_straggler') . '";');
            eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
        }

        (
$hook vBulletinHook::fetch_hook('misc_smiliespopup_category')) ? eval($hook) : false;

        eval(
'$smiliebits .= "' fetch_template('smiliepopup_category') . '";');
        
$bits = array();
        foreach (
$smilies AS $smilie)
        {
            (
$hook vBulletinHook::fetch_hook('misc_smiliespopup_smilie')) ? eval($hook) : false;

            
$smilie['js'] = addslashes_js($smilie['text']);
            
$smiliehtml "<img src=\"$smilie[path]\" id=\"smilie_$smilie[smilieid]\" alt=\"" htmlspecialchars_uni($smilie['text']) . "\" title=\"" htmlspecialchars_uni($smilie['title']) . "\" />";
            eval(
'$bits[] = "' fetch_template('smiliepopup_smilie') . '";');
            if (
sizeof($bits) == 2)
            {
                
exec_switch_bg();
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
                
$bits = array();
            }
        }
    }
    if (
sizeof($bits) == 1)
    {
        eval(
'$smiliecells = "' fetch_template('smiliepopup_straggler') . '";');
        eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
    } 
3. Notice that for the following code block
PHP Code:
        if (sizeof($bits) == 1)
        {
            eval(
'$smiliecells = "' fetch_template('smiliepopup_straggler') . '";');
            eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
        } 
there are two of them, one at the top and one at the bottom of the code portion from 2. Replace both of them with
PHP Code:
        if (sizeof($bits) < 5)
        {
            
$remainingcols = (sizeof($bits)) * 1;
            eval(
'$smiliecells = "' fetch_template('smiliepopup_straggler') . '";');
            eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
        } 
4. Find the line
PHP Code:
if (sizeof($bits) == 2
from the code portion from 2. Replace it with
PHP Code:
if (sizeof($bits) == 5
5. Now the smilie popup window should show 5 smilies per row.

Reply With Quote
  #4  
Old 05-09-2012, 12:17 PM
kurti kurti is offline
 
Join Date: Nov 2008
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(Sorry, i know its an old thread.)

I'm still running vB 3.7.4.

I changed the size of the popupwindow in the "editor_smiliebox" template.
and added aditional smiley rows exactly like ReCom discribed.

It works well apart from one thing:
Not all elements of the background in the popupwindow adjust to the new window size.

Screenshot:


I searched in the "editor_smiliebox" and "smileypopup" templates and in the "vBulletin Options" in the admin,
but could not find were to edit the width of the background table inside the popupwindow.


Can anyone help please?
Reply With Quote
  #5  
Old 05-09-2012, 02:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)

That will allow you to find the template and then you may go in and find the code and change the table to have xx columns instead of yy.
Reply With Quote
  #6  
Old 05-10-2012, 03:23 AM
kurti kurti is offline
 
Join Date: Nov 2008
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Lynne, that helped.

I added some more colspan's (from 4 to 10) in the templates
"smiliepopup" and "smiliepopup_category". Perfect.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04229 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete