[MODDB] Quote Post Back Link

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC2] Quote Post Back Link

Post by Erik Frèrejean » Tue Dec 23, 2008 8:11 am

Anyasha wrote:Thanks. Unfortunately I don't have any code from that mod remaining, so I'm not sure why I receive errors on this mod. I'm using 3.0.4 if it matters. :cry:
I haven't had time to look closer at your reports. I hope I can do that this evening/tonight.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC2] Quote Post Back Link

Post by Erik Frèrejean » Tue Dec 23, 2008 7:35 pm

Finally had time to look at these:
Anyasha wrote:Not only does the quote cut off the first letter of what was quoted,
I can't replicate this issue.
Anyasha wrote:but when I try to preview I get this:

Fatal error: Call to a member function bbcode_tpl() on a non-object in /home/****/public_html/includes/mods/functions_qpbl.php on line 298
Valid bug, this is fixed in the next release which I will upload later tonight.
Anyasha wrote:And if I submit, the quote looks like this:

Admin& Qpbl Wrote In: Re: test:
Did you made the language changes? Can you post your bbcode.html?
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

demon327
Registered User
Posts: 847
Joined: Thu Nov 16, 2006 2:16 pm

Re: [RC2] Quote Post Back Link

Post by demon327 » Wed Dec 24, 2008 3:06 pm

Erik Frèrejean wrote:
Anyasha" wrote:And if I submit, the quote looks like this:

Admin& Qpbl Wrote In: Re: test:
Did you made the language changes? Can you post your bbcode.html?
I can comfirm that one :)

bbcode file:

Code: Select all

<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open -->
<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->

<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->

<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->

<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}:</cite><!-- END quote_username_open -->
<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->

<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}: <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code><!-- END code_open -->
<!-- BEGIN code_close --></code></dd></dl><!-- END code_close -->

<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open -->
<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close -->

<!-- BEGIN b_open --><strong><!-- END b_open -->
<!-- BEGIN b_close --></strong><!-- END b_close -->

<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->

<!-- BEGIN i_open --><em><!-- END i_open -->
<!-- BEGIN i_close --></em><!-- END i_close -->

<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color -->

<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size -->

<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" /><!-- END img -->

<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->

<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->

<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->

<!-- Quote Post Back Link -->
	<!-- BEGIN quote_user_post_open --><blockquote><div><cite>{USERNAME} {L_QPBL_WROTE_IN}: <a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}</a>:</cite><!-- END quote_user_post_open -->
	<!-- BEGIN quote_post_open --><blockquote><div><cite><a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}</a>:</cite><!-- END quote_post_open -->
<!-- /Quote Post Back Link -->
lang changes ar done!

also i want to say that this mod works great with the automod :D

User avatar
Forumtreff
Registered User
Posts: 9
Joined: Thu Jun 19, 2008 2:56 pm

Post by Forumtreff » Thu Jan 22, 2009 8:20 pm

Whoever the editor Vim or gvim used, can be use following easily replaced commands for this mod.

includes/bbcode.php

Code: Select all

:17s#^}$#}\r//-- Quote Post Back Link\r//-- Add:\rif (!defined('QPBL'))\r{\r	include ($phpbb_root_path . 'includes/mods/functions_qpbl.' . $phpEx);\r}\r//-- End Quote Post Back Link

Code: Select all

:%s#.*'\#\\\[quote(?:="(\.\*?)")?:$uid\\]((?!\\\[quote(?:="\.\*?")?:$uid\\])\.)?\#ise'\s*=> "\\$this->bbcode_second_pass_quote('\\$1', '\\$2').*# 							//-- Quote Post Back Link\r							//-- Change:\r							// Let the regex match the new quote tags with post id and use the qpbl_second_pass function\r							/*\r							'\#\\[quote(?:=\"(.*?)\")?:$uid\\]((?!\\[quote(?:=\".*?\")?:$uid\\]).)?\#ise'	=> "\\$this->bbcode_second_pass_quote('\\$1', '\\$2')"\r							*/\r							'\#\\[quote(?:=\"(.*?)\")?(;p=\"([0-9]+)\")?:$uid\\]((?!\\[quote(?:=\".*?\")?:$uid\\]).)?\#ise' => "qpbl_second_pass('\\$4', '\\$1', '\\$3')"\r							//-- End Quote Post Back Link

Code: Select all

:%s#'quote_username_open'	=> array('{USERNAME}'	=> '$1'),.*#&\r			//-- Quote Post Back Link\r			//-- Add:\r			'quote_user_post_open'	=> array('{USERNAME}'	=> '$1', '{POST_URI}'		=> '$2', '{POST_TITLE}'	=> '$3'),\r			'quote_post_open'		=> array(						 '{POST_URI}'		=> '$2', '{POST_TITLE}'	=> '$3'),\r			//-- End Quote Post Back Link
includes/message_parser.php

Code: Select all

:%s#.*\/\/ Zero the parsed items array#		//-- Quote Post Back Link\r		//-- Add:\r		// Overwrite the quote regex so that it catches the post id AND uses the qpbl parse function\r		$this->bbcodes['quote']['regexp'] = array('\#\\[quote(?:=\"(.*?)\")?(;p=\"([0-9]+)\")?\\](.+)\\[/quote\\]\#ise' => "qpbl_quote_parse('\\$0')");\r		//-- End Quote Post Back Link\r\r&

Code: Select all

:%s#.*\/\/ If false, then the parsed message get returned but internal message not processed.#		//-- Post Quote Back Link\r		//-- Add:\r		// The $bbcode isn't set in preview mode :(\r		global $bbcode;\r		$bbcode = $this;\r		//-- End Post Quote Back Link\r\r&
posting.php

Code: Select all

:%s#$message_parser->message = '\[quote="' \. $post_data\['quote_username'] \. '"]'.*#&\r	//-- Quote Post Back Link\r	//-- Add:\r	qpbl_quote_post($message_parser->message, $post_id);\r	//-- End Quote Post Back Link
styles/prosilver/template/bbcode.html

Code: Select all

:%s#<!-- END flash -->.*#&\r\r<!-- Quote Post Back Link -->\r	<!-- BEGIN quote_user_post_open --><blockquote><div><cite>{USERNAME} {L_QPBL_WROTE_IN}: <a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}</a>:</cite></div><!-- END quote_user_post_open -->\r	<!-- BEGIN quote_post_open --><blockquote><div><cite><a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}</a>:</cite></div><!-- END quote_post_open -->\r<!-- /Quote Post Back Link -->
styles/subsilver2/template/bbcode.html

Code: Select all

:%s#<!-- END flash -->.*#&\r\r<!-- Quote Post Back Link -->\r	<!-- BEGIN quote_user_post_open -->\r	<div class="quotetitle">{USERNAME} {L_QPBL_WROTE_IN}: <a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}</a>:</div><div class="quotecontent">\r	<!-- END quote_user_post_open -->\r	<!-- BEGIN quote_post_open -->\r	<div class="quotetitle"><a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}</a>:</div><div class="quotecontent">\r	<!-- END quote_post_open -->\r<!-- /Quote Post Back Link -->
If a post has no title, then the missing link, if this story cited. So perhaps the best title of the string => replace. I have also removed other information. Unfortunately, behind the user name the character '&'. And unfortunately missing the first character in the citation. See here: Click! That is so.

styles/prosilver/template/bbcode.html

Find
Tip: This may be a partial find and not the whole line.

Code: Select all

<!-- END flash -->
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

Code: Select all

<!-- Quote Post Back Link -->
	<!-- BEGIN quote_user_post_open --><blockquote><div><cite>{USERNAME} <a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}"><span style="font-size:150%; line-height: 116%">=></span></a></cite><!-- END quote_user_post_open -->
	<!-- BEGIN quote_post_open --><blockquote><div><cite><a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}"><span style="font-size:150%; line-height: 116%">=></span></a></cite><!-- END quote_post_open -->
<!-- /Quote Post Back Link -->
Whoever the editor Vim or gvim used, can be use following easily replaced commands. It is in this Replacement command regardless of whether the code was already inserted.

Code: Select all

:%s#\(<!-- END flash -->.*\)\(\n\+<!-- Quote Post Back Link -->\n\s*<!-- BEGIN quote_user_post_open --><blockquote><div><cite>{USERNAME} {L_QPBL_WROTE_IN}: <a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}<\/a>:<\/cite><\/div><!-- END quote_user_post_open -->\n\s*<!-- BEGIN quote_post_open --><blockquote><div><cite><a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}">{POST_TITLE}<\/a>:<\/cite><\/div><!-- END quote_post_open -->\n<!-- \/Quote Post Back Link -->\)*#\1\r\r<!-- Quote Post Back Link -->\r	<!-- BEGIN quote_user_post_open --><blockquote><div><cite>{USERNAME} <a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}"><span style="font-size:150%; line-height: 116%">=></span></a></cite><!-- END quote_user_post_open -->\r	<!-- BEGIN quote_post_open --><blockquote><div><cite><a href="{POST_URI}" title="{L_QPBL_WROTE_IN}: {POST_TITLE}"><span style="font-size:150%; line-height: 116%">=></span></a></cite><!-- END quote_post_open -->\r<!-- /Quote Post Back Link -->
Last edited by Forumtreff on Wed Jan 28, 2009 4:20 am, edited 1 time in total.

User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [RC2] Quote Post Back Link

Post by ChriZathens » Sat Jan 24, 2009 2:39 am

Erik Frèrejean wrote:
Anyasha wrote:And if I submit, the quote looks like this:

Admin& Qpbl Wrote In: Re: test:
Did you made the language changes?
Hi, Erik... I'm afraid I have the same problem. Regarding language there are no language changes in the installation file, only one lang file addition and the file is in its place alright ...
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC2] Quote Post Back Link

Post by Erik Frèrejean » Sat Jan 24, 2009 1:16 pm

Thanks for the confirmation ChriZathens.
I've put this on my todo list, but no guaranties when I look into it.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: [RC2] Quote Post Back Link

Post by marian0810 » Sat Feb 14, 2009 11:47 am

Sjaak B wrote:Will test that later, between all other things I have it working without, but with the help of, your mod. :D

Add after:

Code: Select all

	$post_data['quote_username'] = isset($post_data['username']) ? $post_data['username'] : '';
The following lines:

Code: Select all

	$post_data['quote_date'] =  $user->format_date($post_data['post_time']);
	$datime = " @ ";
Replace the line:

Code: Select all

	$message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
by the following line:

Code: Select all

	$message_parser->message = '[quote="' . $post_data['quote_username'] . $datime . $post_data['quote_date'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
It will give output like this:
Sjaak B @ mon 22 dec 2008, 12:00 wrote:
Test
I tried this, but it adds the time of the quote as plain text and not as a timestamp, so it doesn't change over time anymore as it should :cry: Does anyone know how to solve this, or is there another way to accomplish the same thing maybe?
You and me, time and space. You watch us run!

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC2] Quote Post Back Link

Post by Erik Frèrejean » Sun Feb 22, 2009 2:46 pm

Why should the time change over time? The post times of posts never change due to the fact that they are posted at a specific time. Or did I misread your point?

I'll include a switch for this in a later version. But first I have to get the last version into the MODDB, it got lost during the downtime.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: [RC2] Quote Post Back Link

Post by marian0810 » Sun Feb 22, 2009 6:19 pm

Erik Frèrejean wrote:Why should the time change over time? The post times of posts never change due to the fact that they are posted at a specific time. Or did I misread your point?
Sorry if I wasn't clear. What I mean is, if I quote something on my forum right now, the quote will say "today at...." but when I look up that same quote tomorrow it still says "today" when it should say "yesterday". And next week that same quote should have just a date, but instead it will still say "today..." :(
Also when I change the language in my profile, "today" and "yesterday" aren't translated.
You and me, time and space. You watch us run!

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC2] Quote Post Back Link

Post by Erik Frèrejean » Sun Feb 22, 2009 7:29 pm

I assume than that the fix posted by Sjaak B isn't correct. I haven't got the time now to fix this, but I will include this in the release following the upcoming.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: [RC2] Quote Post Back Link

Post by marian0810 » Sun Feb 22, 2009 7:49 pm

Thanks, I'm looking forward to that! :D
You and me, time and space. You watch us run!

User avatar
Richio747
Registered User
Posts: 49
Joined: Thu Feb 19, 2009 7:39 am
Contact:

Re: [RC2] Quote Post Back Link

Post by Richio747 » Fri Mar 27, 2009 8:29 am

phpBB 3.0.4
AeroBlue - mostly based on subsilver2

Following instructions, I placed code after the first {

Code: Select all

if (!defined('IN_PHPBB'))
{
//-- Quote Post Back Link
//-- Add:
if (!defined('QPBL'))
{
	include ($phpbb_root_path . 'includes/mods/functions_qpbl.' . $phpEx);
}
//-- End Quote Post Back Link
	exit;
}
Result:

Code: Select all

Fatal error: Call to undefined function qpbl_second_pass() in /home/explorer/public_html/includes/bbcode.php(120) : regexp code on line 1
Did I get that part right?

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: [RC2] Quote Post Back Link

Post by Erik Frèrejean » Fri Mar 27, 2009 9:52 am

Which edit is this?
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
Richio747
Registered User
Posts: 49
Joined: Thu Feb 19, 2009 7:39 am
Contact:

Re: [RC2] Quote Post Back Link

Post by Richio747 » Fri Mar 27, 2009 2:44 pm

Erik Frèrejean wrote:Which edit is this?
I'm sorry, Erik.
It was a bit late. ZZzz ;)

includes/bbcode.php

Find:

Code: Select all

}
But I see now, that I found the open bracket rather than the close bracket :oops:
...So let me re-install and see it that works.

User avatar
Richio747
Registered User
Posts: 49
Joined: Thu Feb 19, 2009 7:39 am
Contact:

Re: [RC2] Quote Post Back Link

Post by Richio747 » Fri Mar 27, 2009 3:53 pm

'Had a chance to re-install - correctly this time.
'Works great! :D

Perfect for long threads!!!

Perhaps a color change for quote back link so it would be more obvious.

Locked

Return to “[3.0.x] MODs in Development”