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 ] dropdown menu in descripction
Topic Started: Jun 2 2013, 03:07 PM (370 Views)
maytads
Member Avatar
Rich Girl~ Nararananaranarana~
[ *  * ]
Board Address: Private
Board Software: ZetaBoards
Description: Some time ago I asked for an automatic tool for my RPG forum. My request, if possible, I'd like also worked with this other code, except that instead of the drop down menu set the prefix in the title, place it in the description.

Is it possible?

I try to make certain groups may have access to the auto-tools, so when placed: {CLOSE} and {OPEN}, was much easier. But they can also see the Report CP, because they are forums moderators, and I do not want that. :facepalm:

Please help me. Thanks in advance m(_ _)m
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

If I understand correctly, you want to change the automatic tool code from:
Code:
 
if(location.href.match(/forum\//i)){ $("div.description").each(function(){
if($(this).text()=="{CLOSED}"){ var tstarter=$(this).parent('td').next('td').html();$(this).html("CLOSED - You must contact "+tstarter+" to join this roleplay."); }
if($(this).text()=="{OPEN}"){ $(this).text("OPEN - This roleplay is open for all users."); }
}); }
to
Code:
 
if(location.href.match(/forum\//i)){ $("div.description").each(function(){
if($(this).text().contains("{CLOSED}")){ var tstarter=$(this).parent('td').next('td').html();$(this).html("CLOSED - You must contact "+tstarter+" to join this roleplay."); }
if($(this).text().contains("{OPEN}")){ $(this).text("OPEN - This roleplay is open for all users."); }
}); }
Otherwise you may have to explain it again or have someone who understands what you want to modify the code(s).

Edit: Perhaps you mean to say you want the "{OPEN}" and "{CLOSED}" to be options in a drop menu?
Edited by DaPizzaMan, Jun 2 2013, 04:08 PM.
Offline Profile Goto Top
 
maytads
Member Avatar
Rich Girl~ Nararananaranarana~
[ *  * ]
DaPizzaMan
Jun 2 2013, 04:06 PM
Edit: Perhaps you mean to say you want the "{OPEN}" and "{CLOSED}" to be options in a drop menu?
Exactly, with the difference that it works in the description and that would work with my request.

Please ToT
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this instead for topic description prefixes:
Code:
 
<script type="text/javascript">
//<![CDATA[
$(function () {
var forums = [1000326, 1020327];
var prefixes = ['Prefix 1', 'Prefix 2', 'Prefix 3'];

for (var x = 0; x < forums.length; x++) {
if (location.href.indexOf('?type=1&mode=1&f=' + forums[x] + '') !== -1) {
$('input[name="description"]').before('<select id="desc_pre" style="vertical-align: middle"><option value="">Prefix:</option></select>');
}
}

for (var i = 0; i < prefixes.length; i++) {
$('#desc_pre').append('<option value="' + prefixes[i] + '">' + prefixes[i] + '</option>');
}

$('#desc_pre').change(function () {
var value = $(this).val();
$('input[name="description"]').val(value);
});
});
//]]>
</script>
Offline Profile Goto Top
 
maytads
Member Avatar
Rich Girl~ Nararananaranarana~
[ *  * ]
Oh gosh Cory, you are the best coder of all times. Works wonderfully~

Thank you so much =3

(/TДT)/ Why are not already part of this staff?
Offline Profile Goto Top
 
Eccentric Feline
Member Avatar
梦想
[ *  *  *  *  *  *  *  * ]
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