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 ] Edit code for specefic group use only
Topic Started: Jul 26 2013, 08:36 AM (187 Views)
i2pm
Member
[ *  * ]
Q-Edit Code
http://if.invisionfree.com/topic/5097689/1/
Can someone edit code so that it only works for specific groups e.g. Admin & Staff only.

Default topic/post template:
http://if.invisionfree.com/topic/5079157/1/
Can someone edit this code so that it only applies for a specific group e.g. Admin & Staff only.

I just want someone to help edit code so that the code either disables for certain groups or applies to only group, either one will work.
I would ask the person who made the code but they haven't been active since 2012 and the other user don't know how to contact because Reid just reposted from a support board.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Like this, replacing GROUP_ID to the ID of the groups you want to disable the code for:
Code:
 
function QEDisableFor(gID) {
if ($.zb.stat.mid !== gID) {
$.getScript('http://zb-query.googlecode.com/svn/qedit/q-edit.js');
}
}

QEDisableFor(GROUP_ID);
QEDisableFor(GROUP_ID);
QEDisableFor(GROUP_ID);
Code:
 
function TTDisableFor(gID) {
if ($.zb.stat.mid !== gID) {
// Default Topic/Post Template (By Mwr247)
var cpt = document.getElementById('c_post-text');

function ttemp(forumid, posttxt) {
if (location.href.match('f=' + forumid) && location.href.match('mode=1')) {
cpt.value += posttxt + '\n';
}
}

function ptemp(forumid, posttxt) {
if (location.href.match('f=' + forumid) && location.href.match('mode=2')) {
cpt.value += posttxt + '\n';
}
}

// Forum-Topic Content
ttemp('1395', 'Topic Content:');
ttemp('1395', 'Another Topic Line:');

// Forum-Post Content
ptemp('1395', 'Post Content:');
ptemp('1395', 'Another Post Line:');
}
}

TTDisableFor(GROUP_ID);
TTDisableFor(GROUP_ID);
TTDisableFor(GROUP_ID);
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Alright thx Cory. :)
Offline Profile Goto Top
 
Moonface
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