The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Announcements for members only?

2 posters

Go down

Announcements for members only? Empty Announcements for members only?

Post by Guest August 29th 2010, 5:57 am

Hello,

I would like to set my announcements to display ONLY for members.. How can I do this?
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Darren1 August 29th 2010, 6:18 am

Hi,
Do you mean scrolling announces, or post announces?
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 29th 2010, 6:22 am

I mean the general scrolling announcements.

located in ACP: General > Messages and Emails > Announcements |
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Darren1 August 29th 2010, 8:18 am

It might be possible with the template editions, but I don't think it's possible in phpbb3 without template editions.
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 29th 2010, 6:57 pm

hmm.. does anyone know if this is possible on phpBB3??
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 29th 2010, 11:37 pm

Of course it's possible!!!

Here's a phpBB3 board with a homepage message that changes depending on whether you are a member or a guest: http://www.thefacebookforum.net/forum.htm

I'm sure the same code can be applied to announcements as well.

avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 30th 2010, 12:07 am

Dion wrote:Of course it's possible!!!

Here's a phpBB3 board with a homepage message that changes depending on whether you are a member or a guest: http://www.thefacebookforum.net/forum.htm

I'm sure the same code can be applied to announcements as well.

I'm not sure I'm seeing what you are talking about, do u have to be a registered member on that forum in order to see their announcements? If so, thats exactly what I would like to do, I just need to figure this out!
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Darren1 August 30th 2010, 9:00 am

ooohhhhhhhhhhhhhh! Thats true Dion, I completely forgot about that!


Click on the "Homepage message" to see what I mean.

I don't know how exactly he did it, but I got a feeling it's JS, I'll try and find out for ya Wink
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by ankillien August 30th 2010, 10:26 am

hmmm...Looks like I've found the script Wink Lots of javascript and nothing else Razz
The script is made by Dion, I think so I can't reveal it without his permission, it could be copyrighted Razz
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 30th 2010, 2:20 pm

What about adding the announcements code between:
Code:

<!-- BEGIN switch_user_logged_in -->
HERE
<!-- END switch_user_logged_in -->

in the templates Very Happy. but the problem is i can't find it there Very Happy or maybe it has another name Very Happy.. try finding it Very Happy
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by ankillien August 30th 2010, 4:39 pm

Gangstar15 wrote:What about adding the announcements code between:
Code:

<!-- BEGIN switch_user_logged_in -->
HERE
<!-- END switch_user_logged_in -->

in the templates Very Happy. but the problem is i can't find it there Very Happy or maybe it has another name Very Happy.. try finding it Very Happy

He wants it for phpBB3.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 30th 2010, 4:40 pm

Ops sorry Smile :/
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 31st 2010, 1:03 am

ankillien wrote:hmmm...Looks like I've found the script Wink Lots of javascript and nothing else Razz
The script is made by Dion, I think so I can't reveal it without his permission, it could be copyrighted Razz
we need to get this Dion guy in here then! if he knows of a way then im guessing hes my only hope at the moment, i been trying to figure this out for weeks.. I set my chatbox as an announcement but it looks like a big black box to guest because its an iframe code. This is where my need to make announcements invisible for guest comes in.
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest August 31st 2010, 5:19 am

Use a script like this:
Code:
<script type="text/javascript">
if(document.getElementById('i_icon_mini_logout')) {"member code"}
</script>

"member code" will only be executed when a member is logged in. So, if "member code" contains code to display a message, only members that are logged in will see the message.

I leave it up to you to write "member code", and how to insert the script into your forum.
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest September 1st 2010, 6:56 am

Dion wrote:Use a script like this:
Code:

if(document.getElementById('i_icon_mini_logout')) {"member code"}

"member code" will only be executed when a member is logged in. So, if "member code" contains code to display a message, only members that are logged in will see the message.

I leave it up to you to write "member code", and how to insert the script into your forum.

k i just tried that and it didnt work. I put my entire code in replacement of "member code". This is the exact code i put in the announcements and all it did was make the nothing show, even while i was logged in:

Code:
<script type="text/javascript">
if(document.getElementById('i_icon_mini_logout')) {"<div style="float:right;text-align:right;"><b>Please click
'Log In' to use the members only Chatbox. 
↓</b></div><div><b>Please View The-EN Chatbox
Rules: <a
href="http://www.the-en.com/rules-f18/chatbox-rules-click-here-t1599.htm?sid=b449803b34e1f34fd8b6e8fb74e4b9c3"
 class="postlink">Click
Here!</a></b></div><br>
<iframe frameborder="0" width=100% height=350
src=http://electronicnetwork.all-up.com/chatbox/chatbox.forum 
marginheight=2 marginwidth=2 scrolling=auto allowtransparency=yes
name=EN Chatbox style=border:#002EFF 1px
solid;border-top:0px></iframe>"}
</script>
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by ankillien September 1st 2010, 8:03 am

Hey SPADEZ,

I think you need to put the HTML codes in document.write() function of javascript. It won't work if you put it directly like HTML.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest October 8th 2010, 4:51 am

Hey ankillien I still cant figure this out... Can you please tell me how to put this code:
Code:
<div style="float:right;text-align:left;"><div><b>EN Public Chatroom: <a href="http://xat.com/ElectronicNetwork" class="postlink" target="_blank" title="This is our public chatroom for members and guest. The EN Chatbox below is for members only.">Click Here!</a></b></div><b>Please click 'Log In' to use the members only Chatbox.  ↓</b></div><div><b>Please View The-EN Chatbox Rules: <a href="http://www.the-en.com/rules-f18/chatbox-rules-click-here-t1599.htm?sid=b449803b34e1f34fd8b6e8fb74e4b9c3" class="postlink" title="These are the rules for the EN Chatbox below. Please read them and follow them.">Click Here!</a></b></div><br>
<iframe frameborder="0" width=100% height=350 src=http://electronicnetwork.all-up.com/chatbox/chatbox.forum  marginheight=2 marginwidth=2 scrolling=auto allowtransparency=yes name=EN Chatbox style=border:#002EFF 1px solid;border-top:0px></iframe>

with this code:
Code:
<script type="text/javascript">
if(document.getElementById('i_icon_mini_logout')) {"member code"}
</script>
avatar
Guest
Guest


Back to top Go down

Announcements for members only? Empty Re: Announcements for members only?

Post by Guest October 9th 2010, 8:09 am

bump..
avatar
Guest
Guest


Back to top Go down

Back to top


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