Chat images
 
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_chatbox
View previous topic :: View next topic  
Author Message
Hardbyte



Joined: 18 Oct 2004
Posts: 7
Location: UK

PostPosted: Sat Oct 30, 2004 12:09 pm    Post subject: Chat images Reply with quote

Hi-ya

When I change the theme of the portal/forum, the chat online box picture stays the same. I found that this is because it calls the image from the /module/mx_chatbox/ directory instead of the image in the /forum/templates/images/ directory.

I have tried to change the URL in the coding but to still no avail. Is there a way or am I not supposed to change the image?

Same applies to the stats image when adding the box under the site navigation menu,

Your ideas would be appreciated.

Thanks
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Oct 30, 2004 2:47 pm    Post subject: Re: Chat images Reply with quote

Hi,

Is your MX site online? If so, please fill in the website field in your profile.


Thanks

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Hardbyte



Joined: 18 Oct 2004
Posts: 7
Location: UK

PostPosted: Sat Oct 30, 2004 3:24 pm    Post subject: Re: Chat images Reply with quote

Have done, its a mess though as trying all sorts with it at the mo.

Any ideas of the above question?

TIA

 
 
_________________
Thanks, Hardbyte
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Oct 30, 2004 3:31 pm    Post subject: Re: Chat images Reply with quote

Look in the modules/mx_chatbox/templates/images folder. There are several GIFs that you can use with the ChatBox Online/Front blocks.

To select another image, open the files chatbox_online.php and chatbox_front.php, then just change this line:
Code:
$chatbox_icon  = 'chatbox_front_00.gif';

Does that meet your needs?

Using different images depending on the current selected theme requires some other changes in the above mentioned files. Is this what you need?


Cheers

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Oct 30, 2004 5:45 pm    Post subject: Re: Chat images Reply with quote

markus_petrux wrote:
Using different images depending on the current selected theme requires some other changes in the above mentioned files. Is this what you need?

ok, here's how to proceed:

1) Create the following folders:
modules/mx_chatbox/templates/subSilver
modules/mx_chatbox/templates/subSilver/images

2) Copy all images from modules/mx_chatbox/templates/images to modules/mx_chatbox/templates/subSilver/images

3) Repeat steps 1 & 2 for each and every theme that you have installed.

4) Apply the following changes to both files (chatbox_online.php and chatbox_front.php):

Code:
#
# ---[ OPEN ]----------
#
modules/mx_chatbox/chatbox_online.php
#
# ---[ FIND ]----------
#
$chatbox_icon  = 'chatbox_front_00.gif';
#
# ---[ AFTER ADD ]----------
#
if( @file_exists($module_root_path.'templates/'.$theme['template_name'].'/images/'.$chatbox_icon) )
{
   $chatbox_icon = PORTAL_URL.$module_root_path.'templates/'.$theme['template_name'].'/images/'.$chatbox_icon;
}
else
{
   $chatbox_icon = PORTAL_URL.$module_root_path.'templates/images/'.$chatbox_icon;
}
#
# ---[ FIND ]----------
#
   'CHAT_IMG'            => PORTAL_URL.$module_root_path.'templates/images/'.$chatbox_icon,
#
# ---[ REPLACE WITH ]----------
#
   'CHAT_IMG'            => $chatbox_icon,
#
# ---[ SAVE ]----------
#

And you're done. You just need to select the images that better suit your needs for every theme.

Please note, the chatbox icons that you want to use for every theme should be named chatbox_front_00.gif.


Cheers

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Hardbyte



Joined: 18 Oct 2004
Posts: 7
Location: UK

PostPosted: Sun Oct 31, 2004 9:32 am    Post subject: Re: Chat images Reply with quote

Your a star! Im going off to try this now

Thank you so much!

Hardbyte

 
 
_________________
Thanks, Hardbyte
 
Back to top
View user's profile Send private message
Hardbyte



Joined: 18 Oct 2004
Posts: 7
Location: UK

PostPosted: Sun Oct 31, 2004 9:50 am    Post subject: Re: Chat images Reply with quote

Works aswell! Thanks so much.

Would the same apply for the icon_stats.gif and the counter number images?

TIA

 
 
_________________
Thanks, Hardbyte
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Oct 31, 2004 9:52 am    Post subject: Re: Chat images Reply with quote

Why not? The code you should deal with is somehow different, but now got the idea.

Try it, and if you need a hand, just come back. Wink

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Hardbyte



Joined: 18 Oct 2004
Posts: 7
Location: UK

PostPosted: Sun Oct 31, 2004 10:55 am    Post subject: Re: Stats images Reply with quote

Hi-ya, thank you for your advice, I have now changed how to put the icon_stats.gif and the digit images to suit my theme colors.

Just incase anyone wanted to know:

have to create folders of: mx_sitestats/templates/[your theme]/images/digits/mb/

Then upload your icon_stats.gif to: mx_sitestats/templates/[your theme]/images

Also upload your digits to: mx_sitestats/templates/[your theme]/images/digits/mb/

Then edit your counter.php to match:-

Code:

//
// Do we have to show the link to MoreStats?
//
if( $sitestats_config['more_stats_page'] <= 0 )
{
   $u_more_stats = '';
   $img_more_stats = '';
}
else
{
   $u_more_stats = append_sid(PORTAL_URL."index.$phpEx?page=".$sitestats_config['more_stats_page']);
   $img_more_stats = $module_root_path.'templates/'.$theme['template_name']. '/icon_stat.gif';
   $template->assign_block_vars('more_stats_sw', array());
}

//
// Customize the look of the counters...
//
if( $sitestats_config['counter_type'] != '' &&
   $sitestats_counter->setDigitParms($module_root_path.'templates/'.$theme['template_name']. '/images/digits/', $sitestats_config['counter_type']) )
{
   $img_page_hits_counter = $sitestats_counter->getCounterImages($sitestats_counter->hits_counter, $sitestats_config['counter_size'], true);
   $img_page_sess_counter = $sitestats_counter->getCounterImages($sitestats_counter->sess_counter, $sitestats_config['counter_size'], true);


Just incase anyone wanted to know...

Thanks again.

 
 
_________________
Thanks, Hardbyte
 
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_chatbox All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum