Yes I am starting a business and I need to know if I can put a java script on the board. The script is to follow:
Quote<!-- mibew button --><a id="mibew-agent-button" href="/chat/chat?locale=en" target="_blank" onclick="Mibew.Objects.ChatPopups['57c248c84fb94c0d'].open();return false;"><img src="/chat/b?i=mibew&lang=en" border="0" alt="" /></a><script type="text/javascript" src="/chat/js/compiled/chat_popup.js"></script><script type="text/javascript">Mibew.ChatPopup.init({"id":"57c248c84fb94c0d","url":"\/chat\/chat?locale=en","preferIFrame":true,"modSecurity":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/chat\/chat\/style\/popup"});</script><div id="mibew-invitation"></div><script type="text/javascript" src="/chat/js/compiled/widget.js"></script><script type="text/javascript">Mibew.Widget.init({"inviteStyle":"\/chat\/styles\/invitations\/default\/invite.css","requestTimeout":10000,"requestURL":"\/chat\/widget","locale":"en","visitorCookieName":"MIBEW_VisitorID"})</script><!-- / mibew button -->
Thanks for the help
Well, it CAN be added... You would have to add it in index.template.php for every theme
I am not good at php is there a way I can send the file over and have someone add it. I imagine it won't take that long
you have not even told us where you want it, so no one would know where to add the code if you did provide the file.
Sorry, I want it at the top of the forum. Maybe where the news goes? Somewhere at the top
Forum I want to install is http://www.kdtechnology.tech/forum
That's a 404.
Sorry it should be http://www.kdtechnology.tech/support
Depends where you want it. Without the css and image, can only approximate it, but you can try this for starters -
index.template.php
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="fwidth">';
if ($context['user']['is_logged'] && $context['in_maintenance'] && $context['user']['is_admin'])
echo '
<div id="fnotice" class="themepadding">' , $txt['maintain_mode_on'] , '</div>';
echo '
<div id="ftop">
<div id="fheader"><div class="bwgrid">
<div class="bwcell6"><div class="themepadding">
<a href="' , $scripturl , '"><img src="' , !empty($settings['header_logo_url']) ? $settings['header_logo_url'] : $settings['images_url'].'/theme/logo.png' , '" style="max-width: 100%;" alt="*" /></a>
' , !empty($settings['site_slogan']) ? '<div class="subtitle">' . $settings['site_slogan'] . '</div>' : '' , '
</div></div>
<div style = "float: right;">
<!-- mibew button -->
<a id="mibew-agent-button" href="/chat/chat?locale=en" target="_blank" onclick="Mibew.Objects.ChatPopups[\'57c248c84fb94c0d\'].open();return false;"><img src="/chat/b?i=mibew&lang=en" border="0" alt="" /></a>
<script type="text/javascript" src="/chat/js/compiled/chat_popup.js"></script>
<script type="text/javascript">Mibew.ChatPopup.init(\{"id":"57c248c84fb94c0d","url":"\/chat\/chat?locale=en","preferIFrame":true,"modSecurity":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/chat\/chat\/style\/popup"});</script><div id="mibew-invitation"></div><script type="text/javascript" src="/chat/js/compiled/widget.js"></script><script type="text/javascript">Mibew.Widget.init({"inviteStyle":"\/chat\/styles\/invitations\/default\/invite.css","requestTimeout":10000,"requestURL":"\/chat\/widget","locale":"en","visitorCookieName":"MIBEW_VisitorID"\})</script>
<!-- / mibew button -->
</div>
<div class="bwcell10"><div class="themepadding">
<div id="qsearch" class="bwfloatright">
<form id="search_form" class="floatright" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" id="qsearch_search" class="input_text" />
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
Places it far right over search widget.
Don't forget to add backslashes here, to escape single quotes -
Mibew.Objects.ChatPopups[\'57c248c84fb94c0d\'].
Can I send you the file so you can do it? I am not good with php coding and I do not want to mess it up. I can pm you the file. I would like it in the top right corner of the forum
Can't really do much with it without the accompanying css and button image, there's more to it than just that code block. Backup the file and try inserting the code where indicated. Search for the code just above it and copy the js just below it. Without the rest of the package, I get a broken image and a bad link.
would it help if I gave you access to the site and make you an admin so you could get to the code. I can give you FTP access to
Not really. I'll d/l the Mibew package and see if I can get it running on a test install. Are you using 2.1.2?
2.0.11
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Feek.gif&hash=47a7f570d6bf6d5cfe83418f6485d47ce689555d) This requires an involved installation, including it's own database. If you attach your index.template.php from Shelflife theme, I'll insert the code and you can tinker with the formatting from there. Make a backup of the file.
2.1.2 is current version of Mibew Messenger.
OK give me a moment and I will do just that
How do I upload the file?
Here is the attachment
Ok, try this. I ballparked the location, you can adjust the formatting. Search the template for 'mibew button' to find the code. Going off shortly, if you can't get it, I'll be on again for a while tomorrow night.
Thank you it works perfectly
glad you got it worked out.
However - if you plan to run a site for even a limited amount of time, you really should learn to do some basic coding.
Always take a backup before you do anything - that way, if you do screw it up, you can restore the backup...
but really, something simple like this could probably have been done by you in minutes instead of the back and forth that it did take..
OK I have another question, I installed the forum on our sister site. But now the live chat is not working. Is there something I can do to resolve that or do I need to create it's own chat system?
It should work if you replace all the paths in the button code with complete urls to the existing installation.
I'll Send you a copy of what i did. I tried but no luck. Maybe it is just something small to fix. I tried to replace the URL's but it is still not working
Try this.
Thanks but what did I do wrong?
You have to change all the paths, including http:// in url, and paths inside parts of the script require escape code (backslash \ ) before all forward slashes. Javascript is (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fhairpull1.gif&hash=d1684c7b73ef4c7cc773994cfce0795f18f1c1d9)
ok
Sir Osis of Liver,
I had to reinstall my board, and re downloaded the file above but it is not working? Any suggestions
Did it work when you first installed the file? Which forum did you reinstall, the original or the sister site? Did you reinstall in same directory? Can you post or pm links to both forums?
The link is kdsupport.info and I am going to reinstall Mibew on the site, it worked when you gave me the file, but not now so I am going to reinstall mibew to see if that works
The sister site is using the Mibew install from the original forum, that was the purpose of changing the urls in the button code from relative to absolute links. If it's working on the original board, it should work on the second board with the above index template.
sent you a PM
The urls of the two chat links are different, the one on the main site is https (works), the link on the forum is http (404 error). If you change the code on one, you have to change the other. Try the attached.
OK I checked and it installed, however; when I turn on the support system, it shows offline on the forum.
I reinstalled it to https://kdtechnology.info/chat/
Here is the code it gave me
<!-- mibew button --><a id="mibew-agent-button" href="/chat/chat?locale=en" target="_blank" onclick="Mibew.Objects.ChatPopups['57d874e41ff991f2'].open();return false;"><img src="/chat/b?i=mibew&lang=en" border="0" alt="" /></a><script type="text/javascript" src="/chat/js/compiled/chat_popup.js"></script><script type="text/javascript">Mibew.ChatPopup.init({"id":"57d874e41ff991f2","url":"\/chat\/chat?locale=en","preferIFrame":true,"modSecurity":false,"width":640,"height":480,"resizable":true,"styleLoader":"\/chat\/chat\/style\/popup"});</script><!-- / mibew button -->
Seems to be working now. Only difference is homepage link opens in popup, forum link loads full page.
Where would I find the footer file. I have a new chat system and it needs to go to the footer not the index
the footer is a section within index.template.php
I got it thanks