This is Only One Quote

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
11
61%
Very Good
3
17%
Good
1
6%
Fair
1
6%
Poor
2
11%
 
Total votes: 18

User avatar
Dann0
Registered User
Posts: 76
Joined: Tue Jul 04, 2006 1:36 pm
Contact:

Post by Dann0 » Wed Sep 20, 2006 3:43 am

edit

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Wed Sep 20, 2006 11:12 am

sergemeister wrote: If in a previous post, a user has multiple past quotes and has text inserted between these multiple quotes, this mod will only quote the last portion of text after the last quote. It will not quote all the text from the previous post. Feature, bug or unique characteristic of this mod?


call it whatever you want but bug, yes
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Wed Sep 20, 2006 11:14 am

xpider wrote: Hi, first, sorry for my bad english.

If I quote a mensage with img like this

Code: Select all

[img]http://www.xgn.com.br/fr/img/4416bd81c8346.jpg[/img]
The quoted msg replaces img codes with url, like this:

Code: Select all

[quote]Image Replaced With URL For Only One Quote MOD: http://www.xgn.com.br/fr/url/4416bd81c8346.jpg
[/quote]
The correct msg:

Code: Select all

[quote]
Image Replaced With URL For Only One Quote MOD: http://www.xgn.com.br/fr/img/4416bd81c8346.jpg
[/quote]

Any suggestion??

[]s


Yes, rename your img folder whit another name, img is automatically replaced by the code.

IE:
this
http://www.xgn.com.br/fr/img/4416bd81c8346.jpg
with
http://www.xgn.com.br/fr/images/4416bd81c8346.jpg

greets
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [2.0.18] This is Only One Quote

Post by 3Di » Sun May 13, 2007 11:28 am

http://www.phpbb.com/community/viewtopi ... 4#p1848564

The above link leads to a post of mine where you'll find the phpBB 2.0.22 compatible script, not yet validated by the MOD Team though. No changes to the code, just amended the script (FIND actions).

Greets
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

NOOF
Registered User
Posts: 3
Joined: Fri Jan 26, 2007 8:39 pm

Re: [2.0.18] This is Only One Quote

Post by NOOF » Mon Jul 23, 2007 4:51 pm

Hello, I've installed this mod, and I'm trying to understand one part of it.

Part of the MOD has a language file edited so that sometimes when a user quotes it will come back with 'quote does not exist!'. What I'm trying to figure out is why that actually comes up? I thought I saw where it said that will come up if the user is not quoting any content. On my forum, it seems like it will come up if there is a message with quoted text, followed by fairly lengthy text in the next message and then someone hits quote on that one.

In other words.
QUOTED text
New Message

Now someone comes along and hits quote on that one. It should only quote the new message text, which is what the mod is for, but instead gives this 'quote does not exist' message.

Any thoughts?

Thanks

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [2.0.18] This is Only One Quote

Post by 3Di » Mon Jul 23, 2007 7:09 pm

NOOF wrote:Hello, I've installed this mod, and I'm trying to understand one part of it.

Part of the MOD has a language file edited so that sometimes when a user quotes it will come back with 'quote does not exist!'. What I'm trying to figure out is why that actually comes up? I thought I saw where it said that will come up if the user is not quoting any content. On my forum, it seems like it will come up if there is a message with quoted text, followed by fairly lengthy text in the next message and then someone hits quote on that one.

In other words.
QUOTED text
New Message

Now someone comes along and hits quote on that one. It should only quote the new message text, which is what the mod is for, but instead gives this 'quote does not exist' message.

Any thoughts?

Thanks
There should be a problem into yours posting.php file, also privmsg.php needs a check then. Please provide via PM those two files, I'll give them a shot.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Jochser1
Registered User
Posts: 98
Joined: Sat Apr 15, 2006 5:36 am

Re: [2.0.18] This is Only One Quote

Post by Jochser1 » Sat Sep 01, 2007 4:28 pm

Great MOD; works fine on my 2.0.22 board. For those who, like me, want to stop people from quoting images, but keep the nested quoting, here's the slightly altered code. Thanks to my co-admin who did the alterations :p

Code: Select all

##############################################################
## MOD Title:		This is Only One Quote
## MOD Author:		3Di < threed3di@users.sourceforge.net > (Marco) http://threed.5gbfree.com/ipcf/index.php
## MOD Description:	No more nested quotes.
##			Only the last message quoted it is shown in Topics and PMs.
##			BBcode it is always ON to prevent broken layouts if users might want to disallow it.
##			Quoted images are converted to URLs.
##			If no content is quoted then the MOD puts a standard (customizable) message into that quote.
##			SQL added to set the BBcode ON for all Users in one shot.
##
## MOD Version: 1.0.2a
## 
## Installation Level: Easy
## Installation Time: 5 minutes
## Files To Edit: 
##
## posting.php
## privmsg.php
## language/lang_english/lang_main.php
## templates/subSilver/profile_add_body.tpl
##
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: 
##
## DISABLE your board before to MOD it!
##
##############################################################
## MOD History:
##
## 2007-05-13 - Version 1.0.2a
## - small change to a FIND and a fake FIND added, for phpBB 2.0.22's compatibility
## - the code is still the same, so no changes
##
## 2005-11-05 - Version 1.0.2
## - cosmetic changes to template
## - fixed an erroneous FIND
## - tested on 2.0.18
## - The MOD passed the MOD pre-validation process
## - MOD submitted
##
## 2005-10-23 - Version 1.0.1
## - added returns 'Last quote does not exists!' if the last post is empty
## - (tip learnt from the 'Remove quotes from Search Results' MOD)
## - added the whole thing also to PMs
## - tested on localhost 2.0.17 phpBB
## - The MOD passed the MOD pre-validation process
## - MOD submitted
##
## 2005-10-21 - Version 1.0.0
## - changed version number to submitt
## - The MOD passed the MOD pre-validation process
## - MOD submitted
##
## 2005-10-15 - Version 0.5.0 BETA
## - script reviewed
## - added image quoted converted as URL (thanks poyntesm)
## - added the whole thing also to PMs
## - tested on localhost 2.0.17 phpBB
## - 
## 2005-10-12 - Version 0.1.0 BETA
## - code re written
## - added SQL 
##
## 2005-08-24 - Version 0.0.1
## - first release
## 
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ DIY INSTRUCTIONS ]------------------------------------
#
If you're MODding your Forum manually please follow this:

1 - DISABLE YOUR BOARD FIRST!

2 - RUN THE QUERY VIA PHPMYADMIN OR SIMILAR TOOL

3 - MOD THE FILES AND UPLOAD THE STUFF

#
#-----[ SQL ]-------------------------------------------------
#
UPDATE phpbb_users SET user_allowbbcode = 1;

#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
# The line to search is longer.. 
#
			// Use trim to get rid of spaces placed there by MS-SQL 2000
			$quote_username = 
#
#-----[ AFTER, ADD ]------------------------------------------
#
// + This is Only One Quote MOD
			{  
				$message = ( !empty($message) ) ? preg_replace('[/img]', '/url', $message) : '';
				$message = ( !empty($message) ) ? preg_replace('/\[img]/', $lang['Image_url'], $message) : '';
			}
			if ( trim($message) == '' )
			{
				$message = $lang['No_quote_inside'];
			}
// - This is Only One Quote MOD
#
#-----[ OPEN ]------------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------------
#
			if ( $mode == 'quote' )
#
# no further action here, just go to the next FIND ;)
#
#-----[ FIND ]------------------------------------------
#
				$privmsg_message = str_replace('<br />', "\n", $privmsg_message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// + This is Only One Quote MOD
				{  
					$privmsg_message = ( !empty($privmsg_message) ) ? preg_replace('[/img]', '/url', $privmsg_message) : '';
					$privmsg_message = ( !empty($privmsg_message) ) ? preg_replace('/\[img]/', $lang['Image_url'], $privmsg_message) : '';
				}
				if ( trim($privmsg_message) == '' )
				{
					$privmsg_message = $lang['No_quote_inside'];
				}
// - This is Only One Quote MOD
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Reply_with_quote'] = 'Reply with quote';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// + This is Only One Quote MOD
$lang['Image_url'] = '[b][i]Image: [/i][/b] [url]';
$lang['No_quote_inside'] = '';
// - This is Only One Quote MOD
#
#-----[ OPEN ]------------------------------------------------
#
#	we do also this stuff.. ;)
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------------
# the line is longer..
#
		<input type="radio" name="allowbbcode" value="0"
#
#-----[ IN-LINE FIND ]------------------------------------------
#
value="0"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
value="1"
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25388
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

This is Only One Quote

Post by Paul » Sat Oct 06, 2007 8:00 am

MOD Updated to version 1.0.2a
See first post for Download Link
Knock knock
Race condition
Who's there?

My Blog β€’ My Photos β€’ my phpBB Extensions β€’ custom phpBB work & Development

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: This is Only One Quote

Post by 3Di » Sat Oct 06, 2007 11:35 pm

Thanks MOD Team.

@ all: the next version that fixes a minor bug present into this one and previous version as well of this MOD will be submitted as soon as I can.

Thanks. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Engren
Registered User
Posts: 4
Joined: Thu Feb 16, 2006 10:56 am
Location: Sollentuna, Sweden
Contact:

Re: This is Only One Quote

Post by Engren » Fri Oct 12, 2007 3:08 pm

Can't wait for it to be released. I'm suffering from "Last quote does not exists!" when quoting larger posts, and it's such a problem I am unable to keep running this mod until it's been taken care of.

I'm keeping my fingers crossed that this is one of the bugs that'll be solved...

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: This is Only One Quote

Post by 3Di » Fri Oct 12, 2007 4:35 pm

Engren wrote:Can't wait for it to be released. I'm suffering from "Last quote does not exists!" when quoting larger posts, and it's such a problem I am unable to keep running this mod until it's been taken care of.

I'm keeping my fingers crossed that this is one of the bugs that'll be solved...
I'm not aware of this, I'll give it a shot and fix, in case. Thank you.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

dvdd127
Registered User
Posts: 402
Joined: Fri Jan 13, 2006 12:35 am
Location: Chicago, IL

Re: This is Only One Quote

Post by dvdd127 » Fri Oct 26, 2007 2:23 am

Code: Select all

$message = preg_replace('/(\[quote=(.*?)\]((.|\n)*)\[\/quote\])/si',"", $message);
the code above causes a stack overflow.. any ideas how to fix it???
/DD

securitynut
Registered User
Posts: 43
Joined: Tue Jan 16, 2007 7:20 am

Re: This is Only One Quote

Post by securitynut » Sat Oct 27, 2007 9:16 am

Just thought I'd mention an issue (also mentioned a page or two back, but with a less than appealing solution...)

If somebody quotes an image that contains 'img' in the url (For example, http://img147.imageshack.us/img147/6931/example.gif has two occurances of 'img') they will be replaced by 'url' which breaks the link. This can easily be fixed by slightly changing the regex:

Code: Select all

$message = ( !empty($message) ) ? preg_replace('/\[\/img]/', '[/url]', $message) : '';
$message = ( !empty($message) ) ? preg_replace('/\[img]/', '[url]', $message) : '';
But by this point we are just doing a simple find and replace for [img]and[/img], so we might as well save resources and just use str_ireplace...

Code: Select all

$message = ( !empty($message) ) ? str_ireplace('[/img]', '[/url]', $message) : '';
$message = ( !empty($message) ) ? str_ireplace('[img]', '[url]', $message) : '';
Note that I am not using some of the extra features of this mod so don't just copy & paste the above unless you want images to be replaced by links without the extra 'This image has been replaced' comment (which personally I don't think is necessary, YMMV).

Hope that helps someone.

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: This is Only One Quote

Post by 3Di » Sun Oct 28, 2007 11:02 am

dvdd127 wrote:

Code: Select all

$message = preg_replace('/(\[quote=(.*?)\]((.|\n)*)\[\/quote\])/si',"", $message);
the code above causes a stack overflow.. any ideas how to fix it???
Would you mind please to PM me a link where to see that?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

User avatar
3Di
Former Team Member
Posts: 14239
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: This is Only One Quote

Post by 3Di » Sun Oct 28, 2007 11:03 am

securitynut wrote:Just thought I'd mention an issue (also mentioned a page or two back, but with a less than appealing solution...)

If somebody quotes an image that contains 'img' in the url (For example, http://img147.imageshack.us/img147/6931/example.gif has two occurances of 'img') they will be replaced by 'url' which breaks the link. This can easily be fixed by slightly changing the regex:

Code: Select all

$message = ( !empty($message) ) ? preg_replace('/\[\/img]/', '[/url]', $message) : '';
$message = ( !empty($message) ) ? preg_replace('/\[img]/', '[url]', $message) : '';
But by this point we are just doing a simple find and replace for [img]and[/img], so we might as well save resources and just use str_ireplace...

Code: Select all

$message = ( !empty($message) ) ? str_ireplace('[/img]', '[/url]', $message) : '';
$message = ( !empty($message) ) ? str_ireplace('[img]', '[url]', $message) : '';
Note that I am not using some of the extra features of this mod so don't just copy & paste the above unless you want images to be replaced by links without the extra 'This image has been replaced' comment (which personally I don't think is necessary, YMMV).

Hope that helps someone.
That's the minor bug I was talking about, hopefully I'll fix it soon.
Regards
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Post Reply

Return to β€œ[2.0.x] MOD Database Releases”