Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount! Get 20% off now with code SPOOKY-2024!

I need some help with a code........Please

13 years 7 months ago #155745 by zain.abacy
I need some help with a code........Please was created by zain.abacy
Can anyone please help me with this specific issue I have been fighting hard to get, I have this code which I am unable to place and get working in fields Delimiter....

<?php if(modJLiveChatHelper::isOnline($params->get( 'specific_operators' ), $params->get( 'specific_route_id' ))) { ?>
<a href="javascript: void(0);" onClick="requestLiveChat('<?php echo $baseuri ?>index.php?option=com_livechat&view=popup&popup=1&tmpl=component<?php if($params->get( 'specific_operators' )) { echo '&operator='.$params->get( 'specific_operators' ); } ?><?php if($params->get( 'specific_route_id' )) { echo '&routeid='.$params->get( 'specific_route_id' ); } ?>');"><img src="<?php echo $baseImgUri ?>images/<?php if($params->get( 'image_size' ) == '160x86' || !$params->get( 'image_size' )) { ?>livechat-large-online.jpg<?php } else { ?>livechat-online.jpg<?php } ?>" /></a>
<?php } else { ?>
<a href="javascript: void(0);" onClick="requestLiveChat('<?php echo $baseuri ?>index.php?option=com_livechat&view=popup&popup=1&tmpl=component<?php if($params->get( 'specific_operators' )) { echo '&operator='.$params->get( 'specific_operators' ); } ?><?php if($params->get( 'specific_route_id' )) { echo '&routeid='.$params->get( 'specific_route_id' ); } ?>');"><img src="<?php echo $baseImgUri ?>images/<?php if($params->get( 'image_size' ) == '160x86' || !$params->get( 'image_size' )) { ?>livechat-large-offline.jpg<?php } else { ?>livechat-offline.jpg<?php } ?>" /></a>
<?php } ?>
</div>

This is a live chat button which is required to be linked with the desktop messenger, though this is a component and the module works just fine, I want this to be present in the user profile page in the form of fields delimiter. The temporary code just shows a button with out the online or offline status but just a button to be clicked to initiate chat. This is the simple working code...

<a href="javascript: void(0);" onClick="requestLiveChat('index.php?option=com_livechat&view=popup&popup=1&tmpl=component&operator=[user_id]');"><img src="images/livechat-large-online.jpg" /></a>

Based on this can any one please please help me with this issue.

Thank you in Advance

Please Log in or Create an account to join the conversation.

13 years 7 months ago #155913 by zain.abacy
Replied by zain.abacy on topic Re: I need some help with a code........Please
The code when implemented shows both online and offline pictures at the same time the online picture above and the offline picture just below it. I mean it should show one picture thats what the if and else statement should do........I have tried very hard and i am not a programmer, still giving it my best shot changing the code and all. If someone can be generous enough to spare sometime for me here and just tell me what i might be doing wrong, my work will get done

Thank You

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum