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 ] Quick Edit To Topics
Topic Started: Jun 27 2013, 09:02 AM (524 Views)
i2pm
Member
[ *  * ]
Board Address: http://w11.zetaboards.com/kvarietyshows/index/
Board Software: ZetaBoards
Description: I find it annoying if I want to edit topics, I have to go to the topic and then click the button, I want to do it from here:
Posted Image
Where it says "edit button here", it would be great if there was one. That way I don't have to go to each topic and find the edit button. There's a code for the uncheck edit thing, which I found very useful and less time consuming, is it possible to have this too? I bet there are others which would like a code like this, or don't tell there is something like this that I don't know of?
Edited by i2pm, Jun 28 2013, 05:37 AM.
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[
if (location.href.indexOf('/forum/') !== -1) {
$('tr[class*="row"]:has(td.c_cat-title)').each(function () {
var uID = parseInt($(this).find('td.c_cat-starter a').attr('href').split('/profile/')[1].split('/')[0], 10);
if (uID === $.zb.stat.mid || $.zb.moderator === 1) {
$(this).find('td.c_cat-title:eq(0)').find('div.description').prev('img').after('<span class="qe_topic" style="cursor: pointer; position: relative; left: 10px">Edit</span>');
}
});

$('span.qe_topic').click(function () {
$.get($(this).parent('td.c_cat-title').find('a:eq(0)').attr('href') + '/1/?force_ads', function (data) {
window.location.href = $('a[href*="/post/?mode=3&type=1"]:eq(0)', data).attr('href');
});
});
}
//]]>
</script>
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Thx Cory by any chance can you tweak the code a little so that when I go to the edit button it opens in a new window. Usually I click the wheel button "3rd button" on my mouse to open links in new windows as I do not want to exit the current one. If it's not possible then that's okay.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
window.location.href = $('a[href*="/post/?mode=3&type=1"]:eq(0)', data).attr('href');
Change that to this:
Code:
 
window.open($('a[href*="/post/?mode=3&type=1"]:eq(0)', data).attr('href'));
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Sorry I was meant to say "new tab", instead of window. I would like it if when I click the edit button, to edit post. A new tab would come up in my browser.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this instead:

Admin CP Posted Image Themes Posted Image Board Template Posted Image Top of the page
Code:
 
<div id="opacity">
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
if (location.href.indexOf('/forum/') !== -1) {
$('tr[class*="row"]:has(td.c_cat-title)').each(function () {
var uID = parseInt($(this).find('td.c_cat-starter a').attr('href').split('/profile/')[1].split('/')[0], 10);
if (uID === $.zb.stat.mid || $.zb.moderator === 1) {
$(this).find('td.c_cat-title:eq(0)').find('div.description').prev('img').after('<span class="qe_topic" style="cursor: pointer; position: relative; left: 10px">Edit</span>');
}
});

$('#opacity').after('<div id="qe_topic" style="position: fixed; top: 1%; left: 1%; width: 98%"></div>');

$('span.qe_topic').click(function () {
$.get($(this).parent('td.c_cat-title').find('a:eq(0)').attr('href') + '1/?force_ads', function (data) {
$.get($('a[href*="?mode=3&type=1"]:eq(0)', data).attr('href') + '&force_ads', function (posting) {
$('table.posting', posting).closest('form').appendTo('#qe_topic');
$('table.posting tbody tr:not(:has(input[name="title"], input[name="description"], #c_post, button[name="post_submit"])), #btn_preview').hide();
$('#c_post').attr('colspan', '2');
$('table.posting thead th, table.posting div.h2center').append('<span id="qe_topic-close" class="right" style="cursor: pointer">Close</span>');
$('input[name="show_edit"]').removeAttr('checked');
$('#opacity').css('opacity', '0.5');
$('#qe_topic').fadeIn('slow');

$('#qe_topic-close').click(function () {
$('#opacity').css('opacity', '1.0');
$(this).parents('#qe_topic').fadeOut('slow', function () {
$('#qe_topic').html('');
});
});
});
});
});
}
//]]>
</script>

</div>
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Oh wow this is perfect, thx so much Cory!
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