Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Show chat rooms by country

Show chat rooms by country

I have a chat rooms site at Buzz50.com and want to show a different chat room link for each country.

Can I have all the chat room links in one metamod module or do I have to create one module for each country?

Head Buzzer
Buzz50 Seniors

Buzz50
Mr
Beginner Modder
ranks
useravatar
Offline
16 Posts
User info in posts
Administrator has disabled public posting

Re: Show chat rooms by country

Hi Buzz50,

There are different ways you could approach this. Yes you could do it with 13 different modules (1 per English-speaking country?) or you could do it by outputting the HTML directly from the MetaMod, like this:

$url = null;
switch ($fromCountryId) {
  case 'NZ': $url = 'http://www.buzz50.com/lounge-chat-room-nz.php'; break;
  case 'AU': $url = 'http://www.buzz50.com/lounge-chat-room-au.php'; break;
  case 'GB': $url = 'http://www.buzz50.com/lounge-chat-room-gb.php'; break;
}
if (!$url) $url = ''http://www.buzz50.com/lounge-chat-room- … php';
echo "<a href='$url'>Enter Chatroom</a>";


That will just create a simple module that contains that one link in it, and the URL will be customised according to the country of the visitor. Note that the URLs I put there are completely made up. I don't know what your URLs are.

Hope that gets you going,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
186

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked