vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Widen Smiliepopup Window (https://vborg.vbsupport.ru/showthread.php?t=170114)

imcoach 02-10-2008 06:29 AM

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

k111 11-25-2008 12:01 PM

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

found it..

ReCom 11-25-2008 12:27 PM

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.

:):):)

kurti 05-09-2012 12:17 PM

(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:
http://www.saveoursounds.net/000/smi...widtherror.jpg

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?

Lynne 05-09-2012 02:54 PM

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.

kurti 05-10-2012 03:23 AM

Thank you Lynne, that helped. :)

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


All times are GMT. The time now is 12:21 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.00991 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_html_printable
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete