[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!
Get Involved
Locked
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:

[MODDB] Quote Post Back Link

Post by Erik Frèrejean » Sun Dec 21, 2008 5:42 pm

Modification Name: Quote Post Back Link (QPBL)
Author: Erik Frèrejean

Modification Description:: This MOD adds a post back functionallity to the default quote tag.
It will now allow an aditional ;p= parameter which passes a post id to the bbcode system. When the topic is create this post id will be updated to a link back.
Modification Version:: RC2

Demo URL: N/A

Modification Download: https://github.com/erikfrerejean/quote_ ... ee/2.0.0.2

http://www.phpbb.com/customise/db/mod/q ... nk_(qpbl)/
Last edited by Erik Frèrejean on Sun Dec 05, 2010 3:17 pm, edited 3 times in total.
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 » Sun Dec 21, 2008 7:36 pm

Updated the package, as I found an issue with the installation file and I forgot to include the language changes.
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!)

Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: [RC2] Quote Post Back Link

Post by Anyasha » Mon Dec 22, 2008 12:30 am

Not only does the quote cut off the first letter of what was quoted, 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

And if I submit, the quote looks like this:

Admin& Qpbl Wrote In: Re: test:

I'd like to get rid of the "& Qpbl" gibberish and maintain the ENTIRE quoted post and not lose the first letter.

Did you have a previous version of this a long time ago? Because I think I may have installed it and not liked it because of some discrepancy with the "wrote in" part, and perhaps the remaining code is what is throwing this off.
Kiss me, I'm Polish!

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 » Mon Dec 22, 2008 8:11 am

I'll have a look at this when I come home this after noon (I must say I haven't seen those issues at all).
Yes I've written once something like this, but they share no code. It is however possible that you've got some remains in the core that causes some issues.
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 » Mon Dec 22, 2008 11:31 am

Cool mod, but there is a replace statement and i dont like replaces in the core code :( maybe you can intrgrate the mod with:
http://www.absoluteanime.com/admin/mods.htm#multi_quote

Sjaak B
Registered User
Posts: 6
Joined: Sun Dec 21, 2008 3:54 pm

Re: [RC2] Quote Post Back Link

Post by Sjaak B » Mon Dec 22, 2008 12:03 pm

Is it possible for you to add the date and time in the link of the original quote? Then I have two of the most wanted things in one mod. :D

Thanks for your fine mod.

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 » Mon Dec 22, 2008 12:23 pm

demon327 wrote:Cool mod, but there is a replace statement and i dont like replaces in the core code :( maybe you can intrgrate the mod with:
http://www.absoluteanime.com/admin/mods.htm#multi_quote
Small chance that I'll integrate it with that one. I've been planning (for a long time) to create an "advanced quoting" MOD that enhances the whole quote functionality. I've however didn't had the time to do this, there for am I now releasing this in parts and than build one complete package later.
(this will most likely also include a multi quote function).
Sjaak B wrote:Is it possible for you to add the date and time in the link of the original quote? Then I have two of the most wanted things in one mod. :D

Thanks for your fine mod.
That will be included in version 1.2, for now I just want to get this one in the MODDB asap.
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 » Mon Dec 22, 2008 12:35 pm

Erik Frèrejean wrote:
demon327 wrote:Cool mod, but there is a replace statement and i dont like replaces in the core code :( maybe you can intrgrate the mod with:
http://www.absoluteanime.com/admin/mods.htm#multi_quote
Small chance that I'll integrate it with that one. I've been planning (for a long time) to create an "advanced quoting" MOD that enhances the whole quote functionality. I've however didn't had the time to do this, there for am I now releasing this in parts and than build one complete package later.
(this will most likely also include a multi quote function).
then i will wait :D

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 » Mon Dec 22, 2008 12:37 pm

Just noticed this remark:
demon327 wrote:Cool mod, but there is a replace statement and i dont like replaces in the core code :(
You mean in the install.xml? Have you checked what you have to replace there ;)? Those changes can easily be replaced by two edits, a before-add and an after-add.
I always only add lines, if I replace something I only commend out the original line and after that add my own version ;).
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!)

Sjaak B
Registered User
Posts: 6
Joined: Sun Dec 21, 2008 3:54 pm

Re: [RC2] Quote Post Back Link

Post by Sjaak B » Mon Dec 22, 2008 3:25 pm

Erik Frèrejean wrote: That will be included in version 1.2, for now I just want to get this one in the MODDB asap.
That would be great. Maybe I can create something based on your mod because probably the same parts must be edited.

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 » Mon Dec 22, 2008 3:37 pm

The edit will probably be unbelievably easy. At first sight you probably only have to edit:

Code: Select all

    $sql = 'SELECT p.post_id, p.post_subject, t.topic_id, t.forum_id
        FROM (' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t)
        WHERE (p.post_id = ' . (int) $post_id . '
            AND t.topic_id = p.topic_id)';
    $result = $db->sql_query_limit($sql, 1, 0);
    if (false !== ($row = $db->sql_fetchrow($result)))
    {
        $post_uri    = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, array('f' => $row['forum_id'], 't' => $row['topic_id'], 'p' => $row['post_id'])) . '#p' . $row['post_id'];
        $post_title    = censor_text($row['post_subject']);
    }
    $db->sql_freeresult($result); 
in function_qpbl.php so that the query also select the post time and change

Code: Select all

$post_title    = censor_text($row['post_subject']); 
to something like:

Code: Select all

$post_title    = $user->format_date($row['post_time']); 
(untested!)
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!)

Sjaak B
Registered User
Posts: 6
Joined: Sun Dec 21, 2008 3:54 pm

Re: [RC2] Quote Post Back Link

Post by Sjaak B » Mon Dec 22, 2008 8:32 pm

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

Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: [RC2] Quote Post Back Link

Post by Anyasha » Mon Dec 22, 2008 10:25 pm

Erik Frèrejean wrote:Yes I've written once something like this, but they share no code. It is however possible that you've got some remains in the core that causes some issues.
I thought so. Would you happen to have a link to it so I can uninstall it fully? :oops:
Kiss me, I'm Polish!

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 » Mon Dec 22, 2008 10:29 pm

Advanced Quoting
I hope this topic holds the version you've got installed, otherwise you've to look at one of the other package that you can find at the sourceforge site that is linked in that topic.
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!)

Anyasha
Registered User
Posts: 704
Joined: Mon Aug 07, 2006 4:02 am
Name: Anyasha

Re: [RC2] Quote Post Back Link

Post by Anyasha » Mon Dec 22, 2008 10:38 pm

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:
Kiss me, I'm Polish!

Locked

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