Mibew Messenger Community
General => Support => Topic started by: jarradyuhas on September 08, 2010, 06:18:35 PM
-
I have Mibew integrated with Joomla currently and I pull the User's Name from the Joomla Database. I was wondering if there is a way to simply hide the "name" form field in the Chat initiation page. I have it set so they can give a summary, so it wont just be a blank page.
-
Sometime ago I did this in the following way:
1. Add this snippet into your template code:
<?php
$user =& JFactory::getUser();
$user_name = urlencode($user->name);
$user_email = urlencode($user->email);
?>
2. And then inject name and email values into button invocation code (pay attention to bolded code):
<!-- webim button --><a href="/support/chat/client.php?locale=en" target="_blank" onclick="if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('/support/chat/client.php?locale=en&url='+escape(document.location.href)+'&referrer='+escape(document.referrer)+'&name=<?php echo $user_name; ?>&email=<?php echo $user_email; ?>', 'webim', 'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src="/support/chat/button.php?image=webim&lang=en" border="0" width="163" height="61" alt=""/></a><!-- / webim button -->
Hope this will help :)
-
I have already done that (as stated in my first post). I want to hide the Name field so that the user cant change it. If I set it to not change the name field, the user shows up in the Admin interface as Visitor. I changed it in localize to " ", but then it shows nothing as the name. Also, if multiple users use the same computer, it will keep the first users name in the field if I have it set so they cant change it. I just want to change the field to hidden.
-
Found it. Just had to comment out some of the coding in the style tpl files and change the field type to hidden. Works great!