The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Announcments only for guests

View previous topic View next topic Go down

Solved Announcments only for guests

Post by Suuki on September 28th 2011, 12:49 am

Is there some kind of option so only guests can see the ads? I am running on PHPBB2. Thank you.


Last edited by Suuki on October 2nd 2011, 1:45 am; edited 1 time in total

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by kirk on September 28th 2011, 6:38 am

No not any longer. All you can do is reduce the amount of flash ad's.
Other then that you would have to perches credits to have the ads removed.

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on September 29th 2011, 3:11 am

I'm sorry, I meant have Guests only see the announcements.

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on September 29th 2011, 11:28 pm

I guess I'll bump this. Smile

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by LGforum on September 29th 2011, 11:51 pm

Yes its possible.

add this to your site description:
Code:

<span id="name">{ USERNAME }</span>
You'll need to remove the spaces before and after USERNAME.

Then put this in the announcement box:
Code:

<script>
var x=document.getElementById('name').innerHTML;
if ((x == "Guest) || (x == "guest)) {
document.writeln('PUT YOUR ANNOUNCEMENT HERE');
}
</script>

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on September 30th 2011, 1:09 am

I added this
Code:
<script>
var x=document.getElementById('name').innerHTML;
if ((x == "Guest) || (x == "guest)) {
document.writeln('<div style="text-align: center;"><img src="http://cdn1.iconfinder.com/data/icons/nuvola2/48x48/actions/button_cancel.png" alt="" border="0"> <span style="font-size: 18px; line-height: normal;"><strong>Hate Ads?
</strong></span><br><span style="font-size: 18px; line-height: normal;"><strong> Log in to get rid of them!</strong></span></div>');
}
</script>

Plus the code you asked me to add to site description. All I get is an empty box implace of the announcement for members and guests. :o

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by LGforum on September 30th 2011, 1:46 am

try this:

Code:

<script>
jQuery(function() {
var x=document.getElementById('name').innerHTML;
if ((x == "Guest") || (x == "guest")) {
document.writeln('<div style="text-align: center;"><img src="http://cdn1.iconfinder.com/data/icons/nuvola2/48x48/actions/button_cancel.png" alt="" border="0"> <span style="font-size: 18px; line-height: normal;"><strong>Hate Ads?
</strong></span><br><span style="font-size: 18px; line-height: normal;"><strong>            Log in to get rid of them!</strong></span></div>');
}});
</script>


Last edited by LGforum on October 1st 2011, 3:07 pm; edited 1 time in total

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on October 1st 2011, 8:52 am

nah it's doing the same thing. ._.

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by LGforum on October 1st 2011, 3:06 pm

Sorry there has been spelling mistakes in the codes. I have edited my latest post to fix it.
Make sure you have added the correct bit into the site description.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on October 1st 2011, 7:14 pm

it's doing the same thing. Which is an empty box, for members and guests.
O.o

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by Guest on October 1st 2011, 7:17 pm

Try:
Code:
<script>
var variable = "{ USERNAME }";
if (variable == "Guest"){
document.write("Message, but HTML not work");
}
</script>

Delete the space between { and USERNAME } Wink

Guest
Guest


Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on October 1st 2011, 10:06 pm

@Gassy, It just redirects to a blank page with the message when guest.

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by LGforum on October 2nd 2011, 12:26 am

Okay, put your announcement HTML in an announcement with a DIV ID of something like 'guestannounce'

Then, make sure the span i provided above is in your forum description.

and then add this to a javscript file
Code:

$(function() {
var x=document.getElementById('name').innerHTML;
if ((x != "Guest") || (x != "guest")) {
$('#guestannounce').hide();
  }
});

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on October 2nd 2011, 12:49 am

@LGforum wrote:Okay, put your announcement HTML in an announcement with a DIV ID of something like 'guestannounce'

Wah-wah- what's that?
...
What's a DIV ID?

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by LGforum on October 2nd 2011, 1:00 am

You'll need to put <div id="guestannounce"> at the front of all your HTML. and </div> at the end of all your HTML.

Also make sure that the thing i provided goes in the forum description and you remove the spaces before and after USERNAME

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Announcments only for guests

Post by Suuki on October 2nd 2011, 1:17 am

Alright, I'll check it out....
So I put the DIV ID code at the very beginning of the HTML and at the very end...I also added the Java script and put the code in my site description with no space in USERNAME. It's still doing the same thing, my forum must be...defective.
It's okay if this request is to hard, I can live without it.

EDIT: Solved

Suuki
Forumember

Posts : 419
Reputation : 25
Language : English, Japanese (learning lots) :3

Back to top Go down

Solved Re: Announcments only for guests

Post by Jophy on October 2nd 2011, 3:13 am

Since this thread has been marked as 'Solved', I will now lock this thread.

~ Joph25

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum