Change the topic title without editing with jQuery ?
4 posters
Page 1 of 1
Change the topic title without editing with jQuery ?
Hello!
Can anyone tell me if it is possible to put a pencil next to the title, and when you click to change the title without changing the page?
Thanks.
Can anyone tell me if it is possible to put a pencil next to the title, and when you click to change the title without changing the page?
Thanks.
Last edited by Shek on Sun Apr 06, 2014 8:07 pm; edited 1 time in total
Re: Change the topic title without editing with jQuery ?
i think this wont be possible
t edit topic title you must take edit topic it self
t edit topic title you must take edit topic it self
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Change the topic title without editing with jQuery ?
Hello,
This is NOT possible. For editing a post you must go to the editing mode, you can't edit the post like you say.
But you can suggest it: https://help.forumotion.com/f30-suggestions-for-your-forums
This is NOT possible. For editing a post you must go to the editing mode, you can't edit the post like you say.
But you can suggest it: https://help.forumotion.com/f30-suggestions-for-your-forums
Guest- Guest
Re: Change the topic title without editing with jQuery ?
Hi Shek,
Without using jQuery or JavaScript ? Unfortunately, that would not be possible. It is absolutely possible with using jQuery or JavaScript, though. It would just take a bit of work to setup.
Without using jQuery or JavaScript ? Unfortunately, that would not be possible. It is absolutely possible with using jQuery or JavaScript, though. It would just take a bit of work to setup.
Re: Change the topic title without editing with jQuery ?
Yes, it would be with jQuery, if you can do it, I am completely grateful friend.
Re: Change the topic title without editing with jQuery ?
You can consider this a rough draft :
* Placement in the sub forums
It was developed on phpbb3, and uses the toolbar to check the user level. (only viewable to admin/mod)
So if You're not using phpbb3, or not using the toolbar you may experience a bug or it wont work.
* Placement in the sub forums
- Code:
$(function() {
if (_userdata.user_level == 0 || typeof _userdata === 'undefined') return;
$('.topictitle').after('<img id="editTitle" src="http://2img.net/i/fa/prosilver/icon_post_edit_en.png" style="cursor:pointer;" /><div id="postData" style="display:none;"></div>');
$(document).on('click', '#editTitle', function() {
$(this).next().load($(this).prev().attr('href') + ' .post:first a[href$="mode=editpost"]', function() {
var topictitle = $(this).prev().prev().text();
$(this).prev().before('<div id="newTitle"><input class="inputbox medium" type="text" onkeypress="if (event.keyCode==13){return false}" title="The length of the title for this topic must be ranging between 3 and 255 characters" maxlength="255" value="' + topictitle + '" name="subject"><input class="button1" type="submit" accesskey="s" tabindex="6" value="Send" name="post"></div><div id="postDataFull"></div>');
$(this).prev().remove();
$(this).prev().load($(this).find('a').attr('href') + ' form[action="/post"]', function() {
$(this).find('form').children().hide();
$(this).find('form').append($(this).prev());
});
});
});
});
It was developed on phpbb3, and uses the toolbar to check the user level. (only viewable to admin/mod)
So if You're not using phpbb3, or not using the toolbar you may experience a bug or it wont work.
Re: Change the topic title without editing with jQuery ?
Ange Tuteur wrote:You can consider this a rough draft :
* Placement in the sub forums
- Code:
$(function() {
if (_userdata.user_level == 0 || typeof _userdata === 'undefined') return;
$('.topictitle').after('<img id="editTitle" src="http://2img.net/i/fa/prosilver/icon_post_edit_en.png" style="cursor:pointer;" /><div id="postData" style="display:none;"></div>');
$(document).on('click', '#editTitle', function() {
$(this).next().load($(this).prev().attr('href') + ' .post:first a[href$="mode=editpost"]', function() {
var topictitle = $(this).prev().prev().text();
$(this).prev().before('<div id="newTitle"><input class="inputbox medium" type="text" onkeypress="if (event.keyCode==13){return false}" title="The length of the title for this topic must be ranging between 3 and 255 characters" maxlength="255" value="' + topictitle + '" name="subject"><input class="button1" type="submit" accesskey="s" tabindex="6" value="Send" name="post"></div><div id="postDataFull"></div>');
$(this).prev().remove();
$(this).prev().load($(this).find('a').attr('href') + ' form[action="/post"]', function() {
$(this).find('form').children().hide();
$(this).find('form').append($(this).prev());
});
});
});
});
It was developed on phpbb3, and uses the toolbar to check the user level. (only viewable to admin/mod)
So if You're not using phpbb3, or not using the toolbar you may experience a bug or it wont work.
Hi
Can you please make one for punBB as well?
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: Change the topic title without editing with jQuery ?
MY GOD Ange Tuteur, you're the light at the end of the tunnel! I love You!!! For my part, is resolved dear, thank you for everything!
Re: Change the topic title without editing with jQuery ?
You're welcome, Shek
I will play with the code more when I am free to see if I can improve it further. If I make any updates I'll notify you.
Topic solved and archived
Pizza boi,
It is working from what I tested on punbb.
I will play with the code more when I am free to see if I can improve it further. If I make any updates I'll notify you.
Topic solved and archived
Pizza boi,
It is working from what I tested on punbb.
Similar topics
» Change Topic Title width and height
» Change Title Of Topic
» Title of topic/description text or background change.
» How To Change The Length To 3 of topic title
» How add/change the color of topic title?
» Change Title Of Topic
» Title of topic/description text or background change.
» How To Change The Length To 3 of topic title
» How add/change the color of topic title?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum