vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Private Messages Enhancements - Private Message Quote Formatting (https://vborg.vbsupport.ru/showthread.php?t=292968)

kh99 12-13-2012 11:00 PM

Private Message Quote Formatting
 
1 Attachment(s)
What is it?
----------------------------
This mod arranges quotes in a PM to be in a "conversational" order instead of being nested. This solves the problem of displaying deeply-nested quotes. This mod also has an option to add a date/time stamp to quoted PMs.

Note: I'm marking this "beta" because it hasn't been tested very much. If you try this, please let me know if you have any problems or would like it to work differently.

Also, I'm not much of an html/css person - this mod mostly provides variables which can be checked in the template, and a bare-bones css file. If anyone comes up with css for a better looking format and wants to share it, please do (and maybe I'll put it in a later version).

(vb3 version here: https://vborg.vbsupport.ru/showthread.php?t=292996)


Installation:

----------------------------
Just import the product XML file from the Product Manager. This doesn't change stored PMs in any way (unless you enable the date/time stamp - see below), so you can uninstall or disable the product at any time to go back to the original PM template.

If you'd like to customize the format, you can edit the kh99_pm_quote, kh99_pm_quote_bit, and/or the kh99_pm_quote.css templates.

If you want to add date/time tags to PM quotes, go to the adminCP options under "Private Messaging Options" and set "Add Date and Time to Quotes" to yes. Note that if you later uninstall this mod, any messages quoted while this option was on will still contain a date/time tag, but it will display after the name in a default format and timezone. If this is a concern, it's probably better that you don't enable this option.

Also note that the date/time option only adds the timestamp to newly quoted messages - it will not add one to quotes in existing messages.


History:
----------------------------
0.91 (Dec 22, 2012)
  • Fixed conflict with at least one mod that adds default text formmating
  • Fixed problem with html in pm notification email
  • Option to show only N newest quotes and hide the rest
  • Optional Date/Time tag added to quotes in PMs
  • Added enable/disable option for the entire product, in admincp
  • Templates are now cached
0.9 (Dec 14, 2012)
  • Initial Release

da prez 12-13-2012 11:38 PM

That nesting always drove me crazy.

Thanks

Max Taxable 12-14-2012 12:04 AM

Workable for 3.8.x by chance?

kh99 12-14-2012 12:12 AM

Quote:

Originally Posted by Max Taxable (Post 2390581)
Workable for 3.8.x by chance?

This version definitely won't work. I'm not sure what it would take to make it work with vb3 - I'll take a look at it.

Snowhog 12-14-2012 01:01 AM

No file to download. Drat! Never mind. I see it.

Gemma 12-14-2012 10:34 AM

Most, most, most, most useful. The previous nested format was hideous.

goxy63 12-14-2012 11:33 AM

Installed, nominated, rated. Thank you for this

For me it is better than before, but its still "nesting" only in better way

http://img819.imageshack.us/img819/1962/81915078.png

My forums have fixed widtht, maybe that is why or...?

Anyways, thanks, even like this saves much more space than before.

Cheers

kh99 12-14-2012 01:01 PM

Quote:

Originally Posted by goxy63 (Post 2390626)
Installed, nominated, rated. Thank you for this

For me it is better than before, but its still "nesting" only in better way

My forums have fixed widtht, maybe that is why or...?

Anyways, thanks, even like this saves much more space than before.

Cheers


I can't really see from that what's going on. One thing about this mod is that it only works like is shown in my screen grab if the PM has a series of quotes where the users just replied above or below any existing quotes. If you reply above *and* below, or split up the quote, then it will give up and go back to the original nesting for that part.

For some reason it doesn't look like it's working right in the image you posted, but like I said I can't really see why. Is every PM like that?

goxy63 12-14-2012 02:26 PM

Yes every pm is like that, all I did was just reply bellow existing tags in "Quick Reply" box. Not quite sure about my admin CP settings will check them out but I think nothing was touched there from default options.

Thank you

kh99 12-14-2012 02:37 PM

Hmm...do you know if you have your forum set to save the CSS as files? Try going to the Style Manager > Edit Templates > CSS Templates and edit kh99_pm_quote.css, then just put a space somewhere or something and save it, and see if that makes any difference. (I'm thinking maybe the CSS file doesn't exist after it's installed).

Edit: no, I tested that and that's not it. Could you reply to the PM and copy the message (with bbcodes showing), and PM it to me here? I want to check if there's something about the message format that is confusing my plugin. Also, what version of vb do you have?

goxy63 12-15-2012 01:19 AM

Found what is the problem just now, problem is if message txt is wrapped with [COLOR] tags, check message with bb codes bellow:

HTML Code:

[QUOTE=Administrator2][COLOR="Black"][B][QUOTE=Administrator2][COLOR="Black"][B][QUOTE=Administrator2][COLOR="Black"][B]testing testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testingtesting testing[/B][/COLOR][/QUOTE]

testing testingtesting testingtesting testingtesting testingtesting testing[/B][/COLOR][/QUOTE]

testing testingtesting testingtesting testingtesting testingtesting testing[/B][/COLOR][/QUOTE]

If no [COLOR] tags everything is just great :]

Thank you for your time

EDITED
I am using this mod, and this mod is setting users default txt color
https://vborg.vbsupport.ru/showthread.php?t=231923

kh99 12-15-2012 01:23 AM

Ah, great. Thanks, I'll look in to that tomorrow (and let's hope that it doesn't break the whole thing).

goxy63 12-15-2012 10:48 AM

Just tested in many different ways with color and bold tags, when in mentioned mod default color is excluded everything is working fine. That is if user manually choose color or bold txt your mod is working just fine which means that this mod is making trouble
https://vborg.vbsupport.ru/showthread.php?t=231923
Sorryz for problems, was thinkig its cause of your mod, probably I will just uninstall that mod as its not updated since 2010

Thank you for your time, cheers

kh99 12-15-2012 12:27 PM

Thanks. Yeah, I looked at it a little bit last night and came to the same conclusion - I'm not able to reproduce the problem no matter what I enter in the editor. At the same time, it doesn't look like that mod's doing anything wrong, it's just doing something different than what normally happens. So I'm still going to try to figure out a way to make it work. The biggest problem right now is my mod is a bit complicated, and I wrote most of it a couple months ago, now I don't remember how it works.

jluerken 12-17-2012 09:05 AM

Thanks kh99. Would be nice to add a "collapse" option so that only the last reply is completly visible and the rest is collapsed by default.
Should be an optional setting because I don't think everybody likes it.
For me this would be the option which makes this mod perfect ^^

kh99 12-17-2012 10:46 AM

I'll think about that. I had intended to have some different styles that were user-selectable, but finally decided that I'd never get it released if I tried to make it too complicated. :)

And as I mentioned in the description, if anyone wants to take a shot at improving the look of it, please do.

justicechick 12-21-2012 03:03 AM

Quote:

Originally Posted by kh99 (Post 2391252)
I'll think about that. I had intended to have some different styles that were user-selectable, but finally decided that I'd never get it released if I tried to make it too complicated. :)

And as I mentioned in the description, if anyone wants to take a shot at improving the look of it, please do.

WOO HOO!! Works great in my 4.2 solved a issue I had lots of complaints about. THANKS

tbworld 12-21-2012 08:44 PM

Nice mod KH99. I bet you put a few hours in this one! :) I had thought about doing something with this part of private messaging, but every time I looked at the code ... well you know.

Thanks! :)

kh99 12-21-2012 11:06 PM

Quote:

Originally Posted by tbworld (Post 2392113)
Nice mod KH99. I bet you put a few hours in this one! :) I had thought about doing something with this part of private messaging, but every time I looked at the code ... well you know.

Thanks. Yeah, it's not very much code but it did take a while to work it out.

craigvm 12-22-2012 09:39 PM

great mod m8.installed

kh99 12-22-2012 10:28 PM

Quote:

Originally Posted by goxy63 (Post 2390786)
Found what is the problem just now, problem is if message txt is wrapped with [COLOR] tags,

Quote:

I am using this mod, and this mod is setting users default txt color
https://vborg.vbsupport.ru/showthread.php?t=231923
Quote:

Originally Posted by jluerken (Post 2391245)
Thanks kh99. Would be nice to add a "collapse" option so that only the last reply is completly visible and the rest is collapsed by default.
Should be an optional setting because I don't think everybody likes it.

New version addresses the above issues and a few others. Also has optional date/time stamp (which someone asked for in the vb3 version thread).

kh99 12-22-2012 10:29 PM

Quote:

Originally Posted by craigvm (Post 2392312)
great mod m8.installed

Thanks. You missed the update by an hour or so - sorry for the inconvenience. :)

sadiq6210 12-23-2012 04:37 AM

Great mod :)

Kevin, could you put a screen shot to show the effect of this option?
"Add Date and Time to Quotes"

I set this option to yes but I cannot notice any change !

Thanks

kh99 12-23-2012 05:17 AM

I'll try to make a screen shot later. But I think the most likely reason you don't see anything is because it does not add date and time to existing messages, it only adds it to new messages.

sadiq6210 12-23-2012 05:38 AM

I think there is something wrong
In existing messages it is okay (I mean the quotes formatting not the date option)

But if I receive a new message and after reply, the another user will receive my message/reply without any quote !

Should I make anything to quote the previews message before send it ?

kh99 12-23-2012 05:50 AM

Hmm...you shouldn't have to do anything special. If you disable this mod, does the quote appear?

When you wrote your reply, did you notice if the message was in quote tags in your reply?

sadiq6210 12-23-2012 05:55 AM

Quote:

Originally Posted by kh99 (Post 2392386)
If you disable this mod, does the quote appear?

Yes

Quote:

Originally Posted by kh99 (Post 2392386)
When you wrote your reply, did you notice if the message was in quote tags in your reply?

No, the post box is empty when I reply even if I click the reply button below the message, the post box still empty !

kh99 12-23-2012 05:59 AM

Hmm...try this if you can: go to the Plugin Manager and disable the "PM Quote Formatting - Add Date/Time to Quote" plugin (uncheck the "Active" checkbox and press "Save Active Status" button at the bottom. See if that makes the quote appear in the reply box.

Edit: Actually, now that I think about it, that probably is no different than setting "Add Date and Time to Quotes" to no. When you set it to Yes, that chnages the way the quote tags are inserted in the reply box, and apparently that isn't working for you for some reason. What version of vbulletin do you have? What version of php? And is your site using a different language?

sadiq6210 12-23-2012 06:33 AM

Quote:

Originally Posted by kh99 (Post 2392390)
Hmm...try this if you can: go to the Plugin Manager and disable the "PM Quote Formatting - Add Date/Time to Quote" plugin (uncheck the "Active" checkbox and press "Save Active Status" button at the bottom. See if that makes the quote appear in the reply box.

Edit: Actually, now that I think about it, that probably is no different than setting "Add Date and Time to Quotes" to no. When you set it to Yes, that chnages the way the quote tags are inserted in the reply box, and apparently that isn't working for you for some reason. What version of vbulletin do you have? What version of php? And is your site using a different language?

You are right Kevin
I changed the option "Add Date and Time to Quotes" to NO and it is working now.

I am using v4.1.12
PHP v5.2.17
Arabic language RTL (I already modified the template "kh99_pm_quote.css" and changed all (left) to (right)

Thanks

da prez 12-23-2012 07:30 AM

I have the same issue.

Reply box is empty when clicking reply to message.
Only happens when add date and time is set to yes.

kh99 12-23-2012 01:02 PM

Quote:

Originally Posted by sadiq6210 (Post 2392392)
You are right Kevin
I changed the option "Add Date and Time to Quotes" to NO and it is working now.

Quote:

Originally Posted by da prez (Post 2392394)
I have the same issue.

Reply box is empty when clicking reply to message.
Only happens when add date and time is set to yes.


Thanks for that information. It turns out that the product xml file is missing a template. I've fixed it (as of the time of this post), so you can download the 0.91 zip file again, or if you want to create the template yourself, it's named kh99_newpm_quote and has only 1 line that looks like this:

Code:

[QUOTE={vb:raw originalposter} - {vb:raw datestr}]{vb:raw pagetext}[/QUOTE]

Sorry about that, and thanks for working with me to figure it out.

sadiq6210 12-23-2012 03:17 PM

Now it is perfect :) Thanks Kevin

Just a suggestion
It will be great if you can make two different quote background

for example
User 1 >> His quotes will appear in red background
User 2 >> His quotes will appear in blue background

Something like "WHATS Application"

What do you think Kevin? :)

kh99 12-23-2012 03:26 PM

Quote:

Originally Posted by sadiq6210 (Post 2392442)
Now it is perfect :) Thanks Kevin

Just a suggestion
It will be great if you can make two different quote background

for example
User 1 >> His quotes will appear in red background
User 2 >> His quotes will appear in blue background

Something like WHATS UP application

What do you think Kevin? :)


You can do that yourself if you want. In the css file, the class kh99_quote_mine will be applied to your messages, and kh99_quote_sender will apply to the person who sent the message. There is also kh99_quote_1 - kh99_quote_5 which can be used in a similar way to set the background color for up to 5 different quoted users.

As I mentioned in the mod description, I'm more of a programmer than a design person, so my intention was to provide the variables so that people could format it the way they like. Maybe if someone comes up with a nice looking display they can share the ccs and or templates here. It would also to be nice to have the look selectable (possibly by each user), but I probably won't do that unless it seems like people want it. If anyone has any ideas along these lines, please share them.

sadiq6210 12-23-2012 03:31 PM

Quote:

Originally Posted by kh99 (Post 2392444)
You can do that yourself if you want. In the css file, the class kh99_quote_mine will be applied to your messages, and kh99_quote_sender will apply to the person who sent the message. There is also kh99_quote_1 - kh99_quote_5 which can be used in a similar way to set the background color for up to 5 different quoted users.

As I mentioned in the mod description, I'm more of a programmer than a design person, so my intention was to provide the variables so that people could format it the way they like. Maybe if someone comes up with a nice looking display they can share the ccs and or templates here. It would also to be nice to have the look selectable (possibly by each user), but I probably won't do that unless it seems like people want it. If anyone has any ideas along these lines, please share them.

Thanks, this is exactly what I need

I will make new appearance and share it here :)

BRB

Gemma 12-23-2012 05:12 PM

Thanks for the update :)

sadiq6210 12-23-2012 06:46 PM

1 Attachment(s)
Quote:

Originally Posted by sadiq6210 (Post 2392446)
Thanks, this is exactly what I need

I will make new appearance and share it here :)

BRB

BEFORE:

https://vborg.vbsupport.ru/attachmen...4&d=1355445160


AFTER:

https://vborg.vbsupport.ru/attachmen...1&d=1356291559

How?
1- Download the attached file and upload it to image folder.

2- Open template "kh99_pm_quote.css" and replace it all with:

Code:

@charset "UTF-8";
/* CSS Document */

.kh99_quote_container
{
/* Applies to every quote */
padding-right: 20px;
}

.kh99_quote
{
/* Applies to every quote */
  border: 1px solid #417394;
  border-radius: 5px 5px 5px 5px;
  padding: 4px 10px;
}

.kh99_quote_hide
{
/* Applies to "show older messages" line */
  font:normal 11px Tahoma,Calibri,Verdana,Geneva,sans-serif;
  margin-left:25px;
  padding-bottom: 10px;
}


.kh99_quote_mine
{
/* Applies to quotes from user readin PM */
  border: 1px solid #B5E192;
  background: url("images/gradients/category-23px-light.png") repeat-x scroll center top #EDF3E5;
}

.kh99_quote_sender
{
/* Applies to quotes from user who sent PM */
  border: 1px solid #DBD6D2;
  background: url("images/gradients/category-23px-light.png") repeat-x scroll center top #F8F8F8;
}

.kh99_quote_odd
{
/* Odd number quotes (first message in series is 'even') */
  margin-left:50px;
}

.kh99_quote_even
{
/* Even number quotes (first message in series is 'even') */
    margin-left:25px;
}

.kh99_quote_1
{
/* First quoted user (affects all subsequent quotes by this user) */
}

.kh99_quote_2
{
/* Second quoted user */
}

.kh99_quote_3
{
/* Third quoted user */
}

.kh99_quote_4
{
/* Fourth quoted user */
}

.kh99_quote_5
{
/* Fifth quoted user */
}


goxy63 01-05-2013 10:12 AM

Hi

Looks like there is another problem when it comes to email notification about new PM for users.
That is, if user receives new pm without quotes its ok, with quotes he gets email notification like this:

Code:

THIS is message:
***************
<!-- BEGIN TEMPLATE: kh99_pm_quote -->
<div class="kh99_quote_container">

  <div class="kh99_quote kh99_quote_mine kh99_quote_even kh99_quote_0">
        <div class="bbcode_postedby">
                        <img src="images/misc/quote_icon.png" alt="Quote" /> Quote member <strong>testmember</strong>

        </div>
                <div class="message">wdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd</div>
  </div><br />

  <div class="kh99_quote kh99_quote_odd kh99_quote_1">
        <div class="bbcode_postedby">
                        <img src="images/misc/quote_icon.png" alt="Quote" /> Quote member <strong>Administrator</strong>

        </div>
                <div class="message"><quote>bla bla bla da da da da da d aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div>
  </div><br />

</div>
<!-- END TEMPLATE: kh99_pm_quote -->ahhahhahahahah bla bvla bla
***************


kh99 01-05-2013 12:49 PM

Quote:

Originally Posted by goxy63 (Post 2394860)
Hi

Looks like there is another problem when it comes to email notification about new PM for users.
That is, if user receives new pm without quotes its ok, with quotes he gets email notification like this:

What version of this mod do you have installed? The problem you mention was in the original version, but I thought it had been fixed in version 0.91. (Edit: it looks like you've only downloaded 0.9, so maybe you just need to upgrade).

vicius_the_one 01-05-2013 01:49 PM

mine not working too....

kh99 01-05-2013 01:53 PM

Quote:

Originally Posted by vicius_the_one (Post 2394896)
mine not working too....

Are you saying that you have the same problem with PM emails? Or do you have a different problem?


All times are GMT. The time now is 07:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02402 seconds
  • Memory Usage 1,860KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete