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)
-   -   Chat Modifications - MGC Chatbox (with AJAX) (https://vborg.vbsupport.ru/showthread.php?t=148472)

ragtek 06-01-2007 01:58 PM

yes mysqli

NeutralizeR 06-01-2007 02:45 PM

How to call a custom user profile field in the chatbox template?

HTML Code:

<img src="$stylevar[imgdir_misc]/$post[field8].gif" alt="$post[field8]" />
<img src="$stylevar[imgdir_misc]/$userinfo[field8].gif" alt="$userinfo[field8]" />

These didn't work.

VBDev 06-01-2007 03:24 PM

Quote:

Originally Posted by NeutralizeR (Post 1259052)
VBDev,

I need help with the IE & smilies problem:
https://vborg.vbsupport.ru/showpost....6&postcount=88

Hum, I'll check that out for the next version buddy. But I don't have this problem at home on IE7 or IE6. With which version of IE did you encountered that ?

Quote:

Originally Posted by ragtek (Post 1259088)
yes mysqli

Hum I don't really know mysqli unfortunately. You encountered that problem with the installation of the bitfield product or the chatbox product ?

To try to solve this problem, could you remove the $db->hide_errors(); and $db->show_errors(); from the product files and do the import.

Then tell me if it shows any new error ?

Quote:

Originally Posted by NeutralizeR (Post 1259132)
How to call a custom user profile field in the chatbox template?

HTML Code:

<img src="$stylevar[imgdir_misc]/$post[field8].gif" alt="$post[field8]" />
<img src="$stylevar[imgdir_misc]/$userinfo[field8].gif" alt="$userinfo[field8]" />

These didn't work.


The userinfo is not an available variable in the templates ;) You must use the $bbuserinfo variable instead, so it would be for you: $bbuserinfo[field8].

NeutralizeR 06-01-2007 03:43 PM

IE6.

I already have the fix and it works with firefox:
PHP Code:

if ($vbulletin->db->num_rows($smileys)) {
            while ((
$smilie $vbulletin->db->fetch_array($smileys)) && $count_smileys $vbulletin->options['mgc_cb_editor_nbsmileys']) {
                
$textsmilie str_replace("'","\'",$smilie['smilietext']);
                
$chatbox_smileys .= '<a href="#top" onclick="return ajout_smilie(\'' $textsmilie '\');" alt="' $smilie['title'] . '"><img src="' $smilie['smiliepath'] . '" border="0" /></a> ';
                
$count_smileys++;
            } 

$bbuserinfo[field8] shows my own info to me, i need to use it for the message posters.

VBDev 06-01-2007 03:54 PM

Oh I see ... this is quite more complicated !

For this you would need to edit the mgc_chatbox.php file to retrieved in the $_POST['do'] == 'ajax_refresh_chat' part :)

You must modify the sql request :
PHP Code:

        $chat_messages $vbulletin->db->query_read("
            SELECT id,username,usergroupid,date,chat,user.userid AS userid
            FROM " 
TABLE_PREFIX "mgc_chatbox AS mgc_cb
            LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = mgc_cb.userid)
            
$where
            ORDER BY date DESC
            LIMIT " 
. ($cb_status == "open" $vbulletin->options['mgc_cb_nbchats']:$vbulletin->
            
options['mgc_cb_nbchats_fermee'])); 

Here you should add after:
PHP Code:

LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid mgc_cb.userid

This:
PHP Code:

LEFT JOIN " . TABLE_PREFIX . "userfield AS uf ON(u.userid uf.userid

And at the end of:
PHP Code:

SELECT id,username,usergroupid,date,chat,user.userid AS userid 

You should add field8.

Then you can use $val[field8] in the mgc_chatbox_bit template.

NeutralizeR 06-01-2007 04:20 PM

Thanks :)

Now i have gender icons near the usernames:
https://vborg.vbsupport.ru/
Screenshot

I also moved the message section to the top. You can make it's location selectable on the next version.

Karabaja 06-01-2007 04:21 PM

Thx VBDev, this looks great. I'll wait for the update to install, since there was some good suggestions. But voted for it in MOTM poll :)

VBDev 06-01-2007 05:16 PM

Quote:

Originally Posted by NeutralizeR (Post 1259192)
Thanks :)

Now i have gender icons near the usernames:
http://img369.imageshack.us/img369/9785/snap1bf5.th.png
Screenshot

I also moved the message section to the top. You can make it's location selectable on the next version.

Nice done :)

Don't worry, I am going to make the position of the editor part selectable for the next version.

Quote:

Originally Posted by Karabaja (Post 1259193)
Thx VBDev, this looks great. I'll wait for the update to install, since there was some good suggestions. But voted for it in MOTM poll :)

Thanks man :) And thanks to all thos who have already voted for me :D Continue to do so if it's not already done plz :rolleyes:

ragtek 06-01-2007 05:31 PM

the 1. error was thet the tables and columns existed:D from the 1. install lol
the 2. was here:
PHP Code:

require_once(DIR '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($vbulletin->$db);
build_forum_permissions(); 


ragtek 06-01-2007 05:34 PM

is it possible to have more rooms or just team and normal?:D


another request: if the sitebackground is black, you cant see the help^^ because the helptext is black to


All times are GMT. The time now is 06:17 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.02348 seconds
  • Memory Usage 1,772KB
  • 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_html_printable
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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