We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Require Link Before Shout In ShoutBox
Topic Started: May 14 2013, 01:59 PM (508 Views)
jragonizer
Member Avatar
Member
[ *  * ]
Zetaboards
www.w11.zetaboards.com/the_round_table
A code that requires someone to have a link with the forum domain before posting in the shoutbox.

Reason: Our shoutbox is an update box for people to post if they updated a project thread. This code would mean that people have to have a link beginning in "www.w11.zetaboards.com/the_round_table/" before posting

Not sure if its possible, but if so thanks in advanced!

:)
Offline Profile Goto Top
 
Jason
Member Avatar
Member
[ *  *  *  *  * ]
An easy way to accomplish this without coding would be to have a separate members group with shoutbox posting rights. Then create an autotool to promote regular members to this new group and run it on everyone who posts in the required thread or forum.
Offline Profile Goto Top
 
jragonizer
Member Avatar
Member
[ *  * ]
well, I don't think you understand what I mean.
To say it frank, people should only be able to shout in the shoutbox if their shout has a link in it.

e.g: "hey guys!" x {and some notification saying you need a link}
"Hey guys! Check out my blog! www.w11.zetaboards.com/myboard/topic/8383930"
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('#shoutpost button').click(function (e) {
if ($('input[name="shouttext"]').val().indexOf(main_url) === -1) {
e.returnValue = e.preventDefault && e.preventDefault() ? false : false;
alert('Your shout must contain our forum URL');
}
});
//]]>
</script>
Offline Profile Goto Top
 
jragonizer
Member Avatar
Member
[ *  * ]
hmm... it doesn't work :-/
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try putting it at the top of the wrapper instead of the bottom.
Offline Profile Goto Top
 
jragonizer
Member Avatar
Member
[ *  * ]
tried it in all of the... still doesn't work :-/
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It works fine for me when I run the code in Firebug on your board.

You have 70+ HTML errors that may be causing it to dysfunction.
Code:
 
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
$('#shoutpost button').click(function (e) {
if ($('input[name="shouttext"]').val().indexOf(main_url) === -1) {
e.returnValue = e.preventDefault && e.preventDefault() ? false : false;
alert('Your shout must contain our forum URL');
}
});
});
//]]>
</script>
If that doesn't work, consider validating your HTML.
Offline Profile Goto Top
 
jragonizer
Member Avatar
Member
[ *  * ]
works! Thanks a ton once again cory!
Offline Profile Goto Top
 
Helena
Member Avatar
M is for Mod

Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic