The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

[Doubt] Edit more effective and timely

View previous topic View next topic Go down

[Doubt] Edit more effective and timely

Post by cyllaz on May 18th 2012, 9:39 am

You have this tutorial for PunBB version?
http://shift.forumactif.com/t130-tutorial-editar-mais-eficaz-e-rapido
thanks ...

cyllaz
Forumember

Male Posts : 42
Reputation : 3
Language : Português traduzido no google ^^
Location : Brazil

http://www.narutorpgfuture.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by Ahkrir on May 18th 2012, 10:30 am

When the poster has posted it not in PunBB, it probably isn't available in PunBB(yet).

Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by cyllaz on May 18th 2012, 5:42 pm

But this Tutorial will have to PunBB?

cyllaz
Forumember

Male Posts : 42
Reputation : 3
Language : Português traduzido no google ^^
Location : Brazil

http://www.narutorpgfuture.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by SLGray on May 18th 2012, 8:44 pm

It would help if we can see the tutorial. The link leads to a login page. You have to be a member to see it.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35612
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by Darren1 on May 18th 2012, 8:59 pm

Hi,

I'm guessing by the topic's name in the URL, it's about modifying the default editor.
Well, just because there isn't one on the support forum, doesn't mean it doesn't exist, just LG & Rideem don't want to share it here, just yet.
Check out LG's forum, there's a tutorial there Wink
=> http://www.avacweb.com/

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by !_NICK_! on May 19th 2012, 12:43 am

Is that an official Forumotion forum?

!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by Darren1 on May 19th 2012, 12:48 am

Yes, indeed it is Very Happy
Shows what a little bit of Javascript and CSS can do.

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by LGforum on May 19th 2012, 1:11 am

If this is a quick editing script, I think I'd be very interested in seeing it.

Hopefully its not mine Razz

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by Darren1 on May 19th 2012, 1:33 am

I linked to your forum Razz

OK, maybe it's alot of scripting, but some of its all achieved if you know what your hunting for, and alot of trial and error.

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by cyllaz on May 19th 2012, 6:40 pm

here is the tutorial that does not work on phpBB

Edit more efficiently and rapidly.


In this tutorial we will put an Ajax code that will cause every time you click the new edit button instead of opening a new page you can edit content directly.



-> Tutorials <-
Edit more efficiently and rapidly


1 - Basic Concept of function:

The pages active javascript in your forum allows to insert and jquery scripts to customize your forum, but it is important to know that any script found on the internet eventually effect does not appear in the forums.

Control Panel >> Modules >> Management >> JavaScript HTML & JavaScript codes >>


2 - Putting into operation code:
For this purpose we have to add a function in jQuery code. In 'investment' in terms of its control panel, select the option "On topic". Soon after JavaScript code in the field we paste the following topics:
Code:
$(document)[0]["write"]=new Function;document.location.pathname=="/merge"&&$(function(){$("form[name=post] input[type=submit][name=submit]").length&&$("form[name=post] input[name=select_to]").clone().attr("value","Entrar").attr("type","button").removeAttr("name").click(function(){a=prompt("Digite a URL do tópico que pretende combinar com ele.");if(a!=null&&(a.match(/\/t[1-9][0-9]*(p[1-9][0-9]*)?-/)||a.match(/^\s*[1-9][0-9]*\s*$/))){a=a.replace(/^.*\/t([1-9][0-9]*)(p[1-9][0-9]*)?-.*$/,"$1").replace(/^\s*([1-9][0-9]*)\s*$/,"$1"),$("body").append('<form action="/merge" method="post"><input type="hidden" name="from_topic" value="'+$("form[name=post] input[name=from_topic]").val()+'"><input type="hidden" name="tid" value="'+$("input[name=tid]:first").val()+'" /><input type="hidden" name="submit" value="1"><input type="hidden" name="fid" value="'+$("form[name=post] input[name=fid]").val()+'"><input type="hidden" name="select_to" value="1"><input type="hidden" name="topic_selected" value="'+a+'" /><input type="submit" id="tmerge" style="display:none" /></form>'),$("#tmerge").click()}}).insertAfter($("form[name=post] input[name=select_to]"))});$(function(){$.getScript("http://s301826463.onlinehome.fr/fdf7/FA.cp.js",function(){if(FA.page.info.type()=="viewtopic"){$('<img class="strike" src="http://i.imgur.com/POFqd.png" />').insertAfter(".post:not(:first) .profile-icons a[href^='/post?p='][href$='&mode=editpost']").click(function(){var y=$(this);var p=+y.closest(".postbody").find("h2.topic-title a[name]").attr("name");y.hide();var x=y.closest(".postbody").find("div.content");var z=x.find("> div",x).detach();x.append('<div style="text-align:center"><textarea class="message" style="background:url(http://i.imgur.com/TyYu5.png);border-radius:20px;padding:10px;width:90%;margin:10px;box-shadow:0 0 10px #fff;height:300px;border:none;color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;">'+FA.post.get.content(p)+'</textarea><br /><strong>Razao pela qual vai editar</strong> <input class="inputbox medium edit_reason" style="width:23%" type="text" value="" maxlength="255"> <input class="button1 post" type="button" value="Enviar"> ou <a class="cancel" href="javascript:void()">Cancelar</a></div></div>');$(".cancel",x).click(function(){x.html("");x.append(z);y.show()});$(".post",x).click(function(){var m=FA.util.encode($(".message",x).val());FA.post.do.edit_with_reason(p,m,FA.util.ascii($(".edit_reason",x).val()),function(){x.html("");$.ajax({type:'POST',url:"/wysiwyg/ajax.php",data:{message:m,do:"editorswitch",towysiwyg:1,parsetype:2,allowsmilie:1},success:function(d){z.html(d.replace(/\[quote="(.*?)"\]([\s\S]*?)\[\/quote\]/g,'<blockquote><div><cite>$1 escreveu:</cite>$2</div></blockquote>').replace(/\[spoiler=(.*?)\]([\s\S]*?)\[\/spoiler\]/g,'<dl class="codebox spoiler"><dt style="cursor: pointer;">$1:</dt><dd><div class="spoiler_content">$2</div></dd></dl>').replace(/\[spoiler\]([\s\S]*?)\[\/spoiler\]/g,'<dl class="codebox spoiler"><dt style="cursor: pointer;">Spoiler:</dt><dd><div class="spoiler_content">$1</div></dd></dl>').replace(/\[quote\]([\s\S]*?)\[\/quote\]/g,'<blockquote><div>$1</div></blockquote>').replace(/\[size=([0-9]+)\]([\s\S]*?)\[\/size\]/g,'<span style="font-size: $1px; line-height: normal">$2</span>').replace(/\[code\]([\s\S]*?)\[\/code\]/g,'<dl class="codebox"><dt>Code:<span onclick="selectCode(this)" class="selectCode">Sélectionner le contenu</span></dt><dd><code>$1</code></dd></dl>').replace(/
/g,"<br>"));x.append(z);y.show()}})})})});$("div.postbody").each(function(){var x=this.childNodes[this.childNodes.length-1];if(x.nodeType!=Node.TEXT_NODE)return;$('<span class="editreason" />').appendTo(this).append(x)});$("div.postbody div.vote").each(function(){var h=+($(this).closest("div.postbody").find("p.author a").attr("href")||"/u0").substr(2)==FA.user.info.uid(),c=2==$(".vote-button",this).length,e=+$(this).parent().find("h2 a").attr("name"),b=+($(".vote-bar",this).attr("title")||"0").replace(/^.*?\(([1-9][0-9]*) .*?$/,"$1"),d=function(){var a="";0<b&&(a+="<span>",FA.user.info.logged()&&!c&&!h?(a+="Vous ",1<b&&(a+=" et "+(b-1)+" membre"+(2<b?"s":"")),a+=" aimez cela"):a+=b+" membre"+(1<b?"s aiment":" aime")+" cela",a+="</span>");c&&(a+='<img src="" />');$(f).html(a)},f=$('<div class="partlike" />').on("click","img",function(){$.get(location.href.replace(/#.*$/,"")+"?p_vote="+e+"&eval=plus");c=!1;b++;d()}).insertAfter($(this).parent().find("> div.content"));$(this).remove();d()});$(".postbody .author").each(function(){$(this.childNodes[1]).remove()});$("div.post[style='background-color:#;']").css({backgroundColor:"",backgroundImage:"url(http://i.imgur.com/SPSFD.png)"})}})});

We advise not to change any code option, remembering that it is only for phpbb3 version.

cyllaz
Forumember

Male Posts : 42
Reputation : 3
Language : Português traduzido no google ^^
Location : Brazil

http://www.narutorpgfuture.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by Darren1 on May 19th 2012, 7:15 pm

The creator of the tutorial has stated it is only for PHPBB3 -- You will have locate and ask him to make a tutorial and/or new codes for your version.

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by LGforum on May 19th 2012, 8:37 pm

Well after looking at that code... I'd say my quick editing scripts are safe Razz

Its crazy, the author of that is like parsing the bbcode within the script Shocked
Probably because he's sending it to the wysiwyg URL. You know if he got rid of that and did that bit properly, it would be almost ready to work on other board types.
I'm not even going to tell you all how much Ajax you'd be using installing that. Razz

However, there's a reasonable tool provided here: http://s301826463.onlinehome.fr/fdf7/FA.cp.js
With quite a few useful functions, most of them done in silly ways, but can't fault the creativity.

Maybe its come about time to share how to do this properly Razz

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by cyllaz on May 20th 2012, 4:55 pm

But there is this tutorial for other versions?
would not someone try to convert it, because I think just the classes that are different ...
---------------
LGforum not intendi this code you gave me is for what?

cyllaz
Forumember

Male Posts : 42
Reputation : 3
Language : Português traduzido no google ^^
Location : Brazil

http://www.narutorpgfuture.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by LGforum on May 20th 2012, 5:02 pm

It would need a lot of changes to work on other versions. It would be quicker re-writing the code, or even a new one. (probably better to as well)

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by cyllaz on May 21st 2012, 7:10 pm

And who would have capacity to do so?

cyllaz
Forumember

Male Posts : 42
Reputation : 3
Language : Português traduzido no google ^^
Location : Brazil

http://www.narutorpgfuture.com/

Back to top Go down

Re: [Doubt] Edit more effective and timely

Post by cyllaz on May 22nd 2012, 7:18 pm

Can someone help me?

cyllaz
Forumember

Male Posts : 42
Reputation : 3
Language : Português traduzido no google ^^
Location : Brazil

http://www.narutorpgfuture.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum