MyBB Community Forums

Full Version: Floating image for GUEST only or SELECTED group
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2014-05-23, 10:10 AM)mmadhankumar Wrote: [ -> ]
(2014-05-22, 11:45 PM)mikefl Wrote: [ -> ]Anyways, that's what I'd like to do...to turn my image into an actual link that'll redirect them
<a href="member.php?action=register"><img src="image link" alt=""></a>



(2014-05-22, 04:28 PM)mikefl Wrote: [ -> ]That's awesome! I like that whole set up too (your site look great tooBig Grin). How would/could I do that? Thank you very much!!!Big Grin

you can get the css using web inspector. its div id=guestimg

or could wait for a day so that I can come online from PC and get you the codes.

I'll just wait for you, cause I think from what I saw it's <div id="guestmsg"> , and in all likeliness that's what you meant but you were probably just going by your assumption of what it was without looking and not being on a PC. Big Grin But as I said before, I know know much at all, and so I'll just wait cause I'm sure I could copy it but then I've gotta figure out the fonts, shades, size, and colors that I don't think would be inherited. Thank you so much and look forward to hearing from you! Big Grin
add this to the headerblock guest template... provide the proper link to your registration page and enter any message you want to display.. you can even put a image instead of a text message.....

<div id="guestmsg">
<a href="http://www.yourforum.com/member.php?action=register">
<div>
//your message//
</div></a>
</div>

and add this css codes to global.css of your theme or in a new css file.... save the template and the css files and hard refresh your browser....

#guestmsg {
background: #000000;
margin-right: 0px;
color: #ffffff;
font-size: 12px;
border: 0px solid #94c2e8;
padding: 8px;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-moz-opacity: .80;
opacity: .90;
box-shadow: 2px 2px 5px #191919;
-moz-box-shadow: 5px 5px 5px #191919;
-webkit-box-shadow: 5px 5px 5px #191919;
width: 304px;
position: fixed;
bottom: 10px;
right: 55px;
z-index: 1000;
text-align: justify;
}

#guestmsg a {
color: #FFF;
text-decoration: none;
font-weight: bold;
}
(2014-05-25, 10:57 AM)mmadhankumar Wrote: [ -> ]add this to the headerblock guest template... provide the proper link to your registration page and enter any message you want to display.. you can even put a image instead of a text message.....

<div id="guestmsg">
<a href="http://www.yourforum.com/member.php?action=register">
<div>
//your message//
</div></a>
</div>

and add this css codes to global.css of your theme or in a new css file.... save the template and the css files and hard refresh your browser....

#guestmsg {
background: #000000;
margin-right: 0px;
color: #ffffff;
font-size: 12px;
border: 0px solid #94c2e8;
padding: 8px;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-moz-opacity: .80;
opacity: .90;
box-shadow: 2px 2px 5px #191919;
-moz-box-shadow: 5px 5px 5px #191919;
-webkit-box-shadow: 5px 5px 5px #191919;
width: 304px;
position: fixed;
bottom: 10px;
right: 55px;
z-index: 1000;
text-align: justify;
}

#guestmsg a {
color: #FFF;
text-decoration: none;
font-weight: bold;
}

Hello, and thank you so much for your response, and the time you've put into it!! Big Grin

I just can't figure this out, cause what I have in my: header_welcomeblock_guest is:

{$floating_guest}<script type="text/javascript">
<!--
lang.username = "{$login_username}";
lang.password = "{$lang->login_password}";
lang.login = "{$lang->login}";
lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>



Now if I add what you provided it's creating a text message in the 'Default Message Area', you know, where it says "Welcome Guest"..The image I want to use instead of text is Register.jpg , and when I insert that, instead of 'Hello Guest', it says 'Register.jpg'.

So as usual, I know I'm doing something wrong, but just don't know where and how to correct that something wrong. Big Grin

Thank you so much mmadhankumar!!

P.S.- I don't even know if all these " &mdash; are supposed to be in this code as color is black and everything else is green and blue. Note that this was code that has nothing to do with you tho, but I'm just sayin. Big Grin
I don't know where you are adding those codes... it is supposed to be added at the end of the header_welcomeblock_guest template.. and the css codes added to the end of the global.css file.

so, the header_welcomeblock_guest should look like this
{$floating_guest}<script type="text/javascript">
<!--
lang.username = "{$login_username}";
lang.password = "{$lang->login_password}";
lang.login = "{$lang->login}";
lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin();
return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}
</a>)</span>

<div id="guestmsg">
<a href="http://www.yourforum.com/member.php?action=register">
<div>
//your message//
</div></a>
</div>
(2014-05-26, 07:06 AM)mmadhankumar Wrote: [ -> ]I don't know where you are adding those codes... it is supposed to be added at the end of the header_welcomeblock_guest template.. and the css codes added to the end of the global.css file.

so, the header_welcomeblock_guest should look like this
{$floating_guest}<script type="text/javascript">
<!--
lang.username = "{$login_username}";
lang.password = "{$lang->login_password}";
lang.login = "{$lang->login}";
lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin();
return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}
</a>)</span>

<div id="guestmsg">
<a href="http://www.yourforum.com/member.php?action=register">
<div>
//your message//
</div></a>
</div>

Hello again, and definitely thank you, but I have all that there, but I've disabled the Plug-In Floating Guest Notify because it's a dead link (not a live link). I'm using a Register image, for hopes of what I'd like to do in turning that Register Button into a link that'll direct right to Registration. How do I make that Register Button a Live Link to Registration Page is what I hope to figure out. I've labeled the image Register.png, but again I've disabled it cause the way it is now, well, it just sits there as a dead image. Any idea how to do this? Thanks again!! Big Grin
this should do what you want....

<script type="text/javascript">
<!--
lang.username = "{$login_username}";
lang.password = "{$lang->login_password}";
lang.login = "{$lang->login}";
lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin();
return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}
</a>)</span>

<div id="guestmsg">
<a href="http://www.yourforum.com/member.php?action=register">
<img src="/full image path/register.png" alt="Register">
</a>
</div>
(2014-05-27, 07:14 AM)mmadhankumar Wrote: [ -> ]this should do what you want....

<script type="text/javascript">
<!--
lang.username = "{$login_username}";
lang.password = "{$lang->login_password}";
lang.login = "{$lang->login}";
lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin();
return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}
</a>)</span>

<div id="guestmsg">
<a href="http://www.yourforum.com/member.php?action=register">
<img src="/full image path/register.png" alt="Register">
</a>
</div>

Hello again, and thank you for the continuous help! After using this I ran into a couple issues and I've posted a couple of attachments so you can see.

(1) It's wanting to add the image in the guest message are, not floating up on the left/right, and possibly from size it's not even showing there. See 1st Attachment.

Note: What I noticed is that we're using this: <div id="guestmsg"> instead of this <div id="floating_guest">, and I mention that because what's enabling that Register Image to show is the Floating Guest Notify Mod which is Authored by Dark Neo (who'd initially replied tell me what you can do, just not how to do, and never came back) http://mods.mybb.com/view/floating-guest-notify .

(2) If you look at Attachment 2, you'll see the Register Image there, but it's dead. It's just sitting there, and IF someone clicked it, it'd do absolutely nothing, ya know? I've tried to change <div id="guestmsg"> to <div id="floating_guest"> and that didn't work either.

I'd really like to be outside of the Guest Message area. I've literally been messing around with this and the variations of this for over 4 hours now. Just this!

Anyways, as usual, thank you mmadhankumar Smile
you have to either use the plugin or my method. You can't have both to work parallely. kindly remove/disable all instances of the plugin before trying my method.
(2014-05-28, 01:18 PM)mmadhankumar Wrote: [ -> ]you have to either use the plugin or my method. You can't have both to work parallely. kindly remove/disable all instances of the plugin before trying my method.

Hello mmadhankumar, sorry for the late reply but have been busy. Just wanted to drop by and tell you that I'd tried that as well, and it was still wanting to put the image in the message area. To tell you the truth, I'm putting this on hold tho until I can get the SEO aspect figured out or else having this Register button will be pointless if nobody is able to find it, ya know? Anyways, just wanted to drop by and say "Thank you endlessly!" Big Grin
Pages: 1 2