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)
-   -   New Posting Features - Default Editor Messages (https://vborg.vbsupport.ru/showthread.php?t=281140)

Pandemikk 04-04-2012 10:00 PM

Default Editor Messages
 
1 Attachment(s)
About DEM:
Default Editor Messages (what a name) allows forum specific messages to populate the editor when users create newthreads. This, originally custom modification, has been converted into a proper vB product for vB.org users. DEM uses instances and messages in combination to allow for very specific message display and order.

Uses:
Have you or your moderators ever had to clean up messes in your community because your users simply ignore or forget the rules? Or maybe you have a specific forum where you want all new posts to follow a template and you find that no matter how much you ask it still isn't followed correctly?

Then this mod is for you! When a user makes a new thread they're most likely not going to go around reading all the rules before they do so (we can still hope, can't we?) but if a chunk of text appears right where they're typing they're bound to stop their fingers and open their eyes!

Features:
  • Fully phrased allowing for translations and multiple languages.
  • Instances! Allows for simple configuration amongst multiple forums with the same message(s).
  • Robust! If you delete a message any instances that used it will default to no bound message. Prevents errors without hindering usage.
  • An "override" setting allows for your message to populate the editor even if other text already exists in there.
  • Auto-delete / replace message(s) on post creation or, with javascript, in the editor itself with your own custom content.
  • Extensive message customization. Specify additional customizable content before and / or after message(s).
-----

Installation requires FTP access for the ACP options and navigation. Upload all files first then import the product.

Support:
Support will not be provided for vBulletin 4 Alpha, Beta or RC versions.
Low priority will be given to posters who do not have this marked as installed
In some cases, support can only be provided if I have an admin login and ftp access.

Changelog:
  • v1.0.0
    • Initial Release
  • v1.1.0
    • Feature: Auto-delete messages on post creation. Both text before and after the message(s) will remain.
    • Feature: Setting and phrase to replace deleted messages with specific text. BBCode is allowed and, if your settings allow it, HTML is allowed.
    • Feature: Phrase-able text on message quote tag. Let's your users know what exactly this message is.
    • Feature: Settings link added in the ACP navigation tab for easy access.
    • Change: Submit button text changed from edit to save when editing an instance or message.
  • v1.2.0
    • Feature: Auto-delete messages using javascript (immediately on editor focus).
    • Feature: Phrase-able text before and after notices without disrupting auto-delete / replace.
    • Feature: Expanded options for auto-delete / replace. Allows for never, always, only with javascript, only with post submission.
Notes:
See Mr. Running's post for screenshots on how to remove message wrap-arounds.

temsamane 04-05-2012 09:23 AM

is it possible to add a new feature: auto-delete this text after posting

Pandemikk 04-05-2012 09:32 AM

Quote:

Originally Posted by temsamane (Post 2316942)
is it possible to add a new feature: auto-delete this text after posting

It would be possible. I'll take it under consideration.

Mr_Running 04-05-2012 10:29 AM

Hi Pandemikk,
Note on the Edit Instance there is a Edit and Reset button

If I may suggest changing Edit to Save

Excellent mod.

Installed and testing it out.

Cheers

Edit: it's on the Manage Message --> Edit Message screen too

Please change Edit button to Save :)

ProFifaLeagues 04-05-2012 10:33 AM

Great Idea Marked up and will install thios evening when i get home thank you!

Trevor Matthews 04-05-2012 11:36 AM

Would be perfect with auto delete as suggested above.
I will wait until then.

Mr_Running 04-05-2012 11:49 AM

I am getting the message in title but not getting a message in the editor.

I have set Override Text = Yes

Pandemikk 04-05-2012 01:10 PM

Quote:

Originally Posted by Mr_Running (Post 2316962)
Hi Pandemikk,
Note on the Edit Instance there is a Edit and Reset button

If I may suggest changing Edit to Save

Excellent mod.

Installed and testing it out.

Cheers

Edit: it's on the Manage Message --> Edit Message screen too

Please change Edit button to Save :)

Ah yes. Sometimes copy and pasting leaves its traces.

Quote:

Originally Posted by Mr_Running (Post 2316983)
I am getting the message in title but not getting a message in the editor.

I have set Override Text = Yes

Not sure what you mean by this. You mean the message is showing not in the editor but in the title? That makes no sense. What version of vB are you using and do you have any other products / plugins enabled that may be interfering with this?

GKPet 04-05-2012 01:15 PM

Definitely an useful mod, will install it later. Please consider implementing temsamane's suggestion, it will be a great addition to this plugin.

Pandemikk 04-05-2012 01:18 PM

Quote:

Originally Posted by GKPet (Post 2317007)
Definitely an useful mod, will install it later. Please consider implementing temsamane's suggestion, it will be a great addition to this plugin.

Three requests for the same feature just hours after release? How can I say no now? ;)

GKPet 04-05-2012 01:20 PM

Quote:

Originally Posted by Pandemikk (Post 2317009)
Three requests for the same feature just hours after release? How can I say no now? ;)

Looking forward to the update, rated 5 stars ;D

In Omnibus 04-05-2012 01:37 PM

Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT messageid, title, active FROM vb_pan_dem_messages
ORDER BY dateline DESC;

MySQL Error : Table 'rhens1.vb_pan_dem_messages' doesn't exist
Error Number : 1146
Request Date : Thursday, April 5th 2012 @ 07:36:02 AM
Error Date : Thursday, April 5th 2012 @ 07:36:02 AM
Script : http://www.prosportsinteractive.net/...=modifymessage
Referrer : http://www.prosportsinteractive.net/...dex.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT
instance.instanceid, instance.title, instance.messageid, instance.displayorder,
message.title AS message_title, message.active,
forum.title AS forum_title
FROM vb_pan_dem_instances AS instance
LEFT JOIN vb_pan_dem_messages AS message USING(messageid)
LEFT JOIN vb_forum AS forum USING(forumid)
ORDER BY instance.displayorder ASC;

MySQL Error : Table 'rhens1.vb_pan_dem_instances' doesn't exist
Error Number : 1146
Request Date : Thursday, April 5th 2012 @ 07:33:46 AM
Error Date : Thursday, April 5th 2012 @ 07:33:47 AM
Script : http://www.prosportsinteractive.net/...modifyinstance
Referrer : http://www.prosportsinteractive.net/...dex.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

Pandemikk 04-05-2012 02:06 PM

Quote:

Originally Posted by ProSportsForums (Post 2317020)
Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT messageid, title, active FROM vb_pan_dem_messages
ORDER BY dateline DESC;

MySQL Error : Table 'rhens1.vb_pan_dem_messages' doesn't exist
Error Number : 1146
Request Date : Thursday, April 5th 2012 @ 07:36:02 AM
Error Date : Thursday, April 5th 2012 @ 07:36:02 AM
Script : http://www.prosportsinteractive.net/...=modifymessage
Referrer : http://www.prosportsinteractive.net/...dex.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT
instance.instanceid, instance.title, instance.messageid, instance.displayorder,
message.title AS message_title, message.active,
forum.title AS forum_title
FROM vb_pan_dem_instances AS instance
LEFT JOIN vb_pan_dem_messages AS message USING(messageid)
LEFT JOIN vb_forum AS forum USING(forumid)
ORDER BY instance.displayorder ASC;

MySQL Error : Table 'rhens1.vb_pan_dem_instances' doesn't exist
Error Number : 1146
Request Date : Thursday, April 5th 2012 @ 07:33:46 AM
Error Date : Thursday, April 5th 2012 @ 07:33:47 AM
Script : http://www.prosportsinteractive.net/...modifyinstance
Referrer : http://www.prosportsinteractive.net/...dex.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

Looks like the install file didn't create the tables. Verify you have create access to your database then uninstall and reinstall the product. If that fails, you can run the query directly yourself. Sadly, I am unable to do anything about this because I cannot control your database permissions.

Pandemikk 04-05-2012 03:09 PM

v1.1.0 Released! Addresses all requests made so far. Included is the surprisingly popular auto-deleted message setting. I've decided to take it a step further and also given the ability to replace the message with your own custom text!

Thanks for all those who've rated and installed. :)

Mr_Running 04-05-2012 03:28 PM

Quote:

Originally Posted by Pandemikk (Post 2317004)
Not sure what you mean by this. You mean the message is showing not in the editor but in the title? That makes no sense. What version of vB are you using and do you have any other products / plugins enabled that may be interfering with this?

Yes, it was in the title...It was kind of neat...do people still say neat. LOL

I am on 4.1.11 p1
I thought it might have been dbtech Post Template

I think it's sorted I have cleared caches and it appears my host may have been updating stuff on their end.

Request: Display without BBcode
Code:

[Quote]
and maybe when you start typing the message disappears. :)

Pandemikk 04-05-2012 03:31 PM

Quote:

Originally Posted by Mr_Running (Post 2317050)
Yes, it was in the title...It was kind of neat...do people still say neat. LOL

I am on 4.1.11 p1
I thought it might have been dbtech Post Template

I think it's sorted I have cleared caches and it appears my host may have been updating stuff on their end.

Request: Display without BBcode [ quote ]and maybe when you start typing the message disappears. :)

That's one patch level away from my dev. Glad you have got it sorted. :)

The problem with removing the BBCode is it becomes much harder to find out which text to delete / replace. I suppose I could query the database for the message(s) and do it that way, though. I'll look into it.

As for typing and the message disappears, that's going to be difficult methinks (beat you on things people don't say anymore) but, again, I'll look into it.

Mr_Running 04-05-2012 03:50 PM

Okay, Looking forward to what comes up...
Yes, I was kind of thinking of having it as a act as placeholder but on key down / mouse click cursor appears and message disappears.

Cursor in place and then we start typing like a mad man. :)

GKPet 04-05-2012 03:57 PM

Quote:

Originally Posted by Pandemikk (Post 2317047)
v1.1.0 Released! Addresses all requests made so far. Included is the surprisingly popular auto-deleted message setting. I've decided to take it a step further and also given the ability to replace the message with your own custom text!

Thanks for all those who've rated and installed. :)

This is by far the most useful mod that I've seen during the entire month xD

In Omnibus 04-05-2012 06:11 PM

Quote:

Originally Posted by Pandemikk (Post 2317025)
Looks like the install file didn't create the tables. Verify you have create access to your database then uninstall and reinstall the product. If that fails, you can run the query directly yourself. Sadly, I am unable to do anything about this because I cannot control your database permissions.

The tables were created in the database. It simply isn't reading them.

Could be a compatibility issue with vBSEO ... I'll do some digging.
I like this mod and hope to get it working.

Pandemikk 04-05-2012 06:46 PM

Quote:

Originally Posted by ProSportsForums (Post 2317092)
The tables were created in the database. It simply isn't reading them.

Could be a compatibility issue with vBSEO ... I'll do some digging.
I like this mod and hope to get it working.

That makes zero sense. Have you tried using that query directly in phpmyadmin or some sort?

Howard 04-05-2012 07:03 PM

Great mod! Any way we can make it so that it doesn't say 'quote editor message'?

Thanks!

Pandemikk 04-05-2012 07:07 PM

Quote:

Originally Posted by Howard (Post 2317116)
Great mod! Any way we can make it so that it doesn't say 'quote editor message'?

Thanks!

Search phrase: pan_dem_editor_replace

The ability to remove the quote tag isn't available yet as I still have to figure out a way to remove the content without it.

Hornstar 04-05-2012 08:02 PM

With autodete, it would be ideal if that functioned at the start when clicking in the editor.

Pandemikk 04-06-2012 06:47 AM

Your wish is my command. ;)

v1.2.0 Released!
Included is the ability to delete / replace messages when clicking the editor. Also included, ability to customize the default quote tag that wraps around the message(s) with your own text.

To upgrade simply reimport the product with overwrite.

Mr_Running 04-06-2012 11:03 AM

These two options behave same/similar
Always Replace:
- Replace messages everywhere.
Only Javascript:
- Only replace messages using javascript (before message is posted).
Please clarify for the guy who may need some sleep. :)

Is there an option to not have Phrase text before and after notices?

djbaxter 04-06-2012 12:29 PM

Quote:

Originally Posted by ProSportsForums (Post 2317020)
Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT messageid, title, active FROM vb_pan_dem_messages
ORDER BY dateline DESC;

MySQL Error : Table 'rhens1.vb_pan_dem_messages' doesn't exist
Error Number : 1146
Request Date : Thursday, April 5th 2012 @ 07:36:02 AM
Error Date : Thursday, April 5th 2012 @ 07:36:02 AM
Script : http://www.prosportsinteractive.net/...=modifymessage
Referrer : http://www.prosportsinteractive.net/...dex.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT
instance.instanceid, instance.title, instance.messageid, instance.displayorder,
message.title AS message_title, message.active,
forum.title AS forum_title
FROM vb_pan_dem_instances AS instance
LEFT JOIN vb_pan_dem_messages AS message USING(messageid)
LEFT JOIN vb_forum AS forum USING(forumid)
ORDER BY instance.displayorder ASC;

MySQL Error : Table 'rhens1.vb_pan_dem_instances' doesn't exist
Error Number : 1146
Request Date : Thursday, April 5th 2012 @ 07:33:46 AM
Error Date : Thursday, April 5th 2012 @ 07:33:47 AM
Script : http://www.prosportsinteractive.net/...modifyinstance
Referrer : http://www.prosportsinteractive.net/...dex.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

Quote:

Originally Posted by ProSportsForums (Post 2317092)
The tables were created in the database. It simply isn't reading them.

Could be a compatibility issue with vBSEO ... I'll do some digging.
I like this mod and hope to get it working.

Quote:

Originally Posted by Pandemikk (Post 2317108)
That makes zero sense. Have you tried using that query directly in phpmyadmin or some sort?

It may make zero sense but I can confirm that it happens. Also using vBSEO with vBulletin 4.1.11 PL1.

djbaxter 04-06-2012 12:37 PM

And here is the reason: Your product file does not properly allow for table prefixes in creating tables so that subsequently when the system looks for the table {prefix}pan_dem_messages that table does not exist - only the table {noprefix}pan_dem_messages exists.

The same problem exists for table pan_dem_instances'.

Nothing to do with vBSEO. It's a bug in the product.

Pandemikk 04-06-2012 01:03 PM

Quote:

Originally Posted by djbaxter (Post 2317350)
And here is the reason: Your product file does not properly allow for table prefixes in creating tables so that subsequently when the system looks for the table {prefix}pan_dem_messages that table does not exist - only the table {noprefix}pan_dem_messages exists.

The same problem exists for table pan_dem_instances'.

Nothing to do with vBSEO. It's a bug in the product.

Could have just said: "You forgot to add the table prefix constant". :)


Quote:

Originally Posted by djbaxter (Post 2317347)
It may make zero sense but I can confirm that it happens. Also using vBSEO with vBulletin 4.1.11 PL1.

Sorry about that, probably the first time I ever forgot to put table_prefix in there. We all make mistakes. :D

Reimport the product and it should be all good to go.

Quote:

Originally Posted by Mr_Running (Post 2317324)
These two options behave same/similar
Always Replace:
- Replace messages everywhere.
Only javascript:
- Only replace messages using javascript (before message is posted).
Please clarify for the guy who may need some sleep. :)

Is there an option to not have Phrase text before and after notices?

They're pretty much idential- but the second option allows for browsers without javascript enabled or very old browsers to still post the message without having the message removed. Another difference, it allows for the message to be intentionally posted e.g copy and pasting a notice.

Perhaps not the most useful, but I thought I'd throw it in there as maybe a person or two might wish to use it.

That option doesn't exist because it is redundant. Simply edit the phrase to a space and that will do what you need. In the next version, I'm going to take it a step further and allow per-instance content before and after the message(s) including an easier way to specify none.

djbaxter 04-06-2012 01:21 PM

Quote:

Originally Posted by Pandemikk (Post 2317357)
Could have just said: "You forgot to add the table prefix constant".

At the time of my first post, I had the error but had not yet determined the reason so just confirmed that the error existed.

I was later able to identify the source of the error and posted again to let you and others know.

Thanks for the quick fix. Can confirm that it now installs correctly.

Mr_Running 04-06-2012 02:18 PM

1 Attachment(s)
v1.2.0

Ability to remove the quote tag --> edit the phrases to a space
Search in Phrases
Code:

pan_dem_editor_replace

Add Space Key
Code:

pan_dem_editor_replace_begin
Attachment 137594



Add Space Key
Code:

pan_dem_editor_replace_end
Attachment 137595




To remove the message default

Add Space Key
Code:

pan_dem_message_default_end
Attachment 137597

Mr_Running 04-06-2012 02:39 PM

Rated 5 stars, Nominated for MOTM

Edit: Here are some thoughts.
How about an option to change font color/colour as I was thinking of making it lighter almost a fade effect.

Presently works when starting a thread only.
Option to have it in the Quick Reply and Go Advanced editor. :)

Pandemikk 04-06-2012 03:05 PM

Quote:

Originally Posted by Mr_Running (Post 2317390)
Rated 5 stars, Nominated for MOTM

Edit: Here are some thoughts.
How about an option to change font color/colour as I was thinking of making it lighter almost a fade effect.

Presently works when starting a thread only.
Option to have it in the Quick Reply and Go Advanced editor. :)

You can use BBCodes in all messages and phrases. However, they will only show up on WYISIWY mode.

I'm going to hold off on branching to threads (assuming that's what you meant) and other areas where the editor is present for now.

angeljs 04-06-2012 03:36 PM

This is a fab mod! It would be great if one could select multiple forums for each message, instead of one at a time. :)

In Omnibus 04-06-2012 03:51 PM

Quote:

Originally Posted by djbaxter (Post 2317347)
It may make zero sense but I can confirm that it happens. Also using vBSEO with vBulletin 4.1.11 PL1.

Quote:

Originally Posted by djbaxter (Post 2317350)
And here is the reason: Your product file does not properly allow for table prefixes in creating tables so that subsequently when the system looks for the table {prefix}pan_dem_messages that table does not exist - only the table {noprefix}pan_dem_messages exists.

The same problem exists for table pan_dem_instances'.

Nothing to do with vBSEO. It's a bug in the product.

Quote:

Originally Posted by Pandemikk (Post 2317357)
Could have just said: "You forgot to add the table prefix constant". :)

Sorry about that, probably the first time I ever forgot to put table_prefix in there. We all make mistakes. :D

Reimport the product and it should be all good to go.

Quote:

Originally Posted by djbaxter (Post 2317361)
At the time of my first post, I had the error but had not yet determined the reason so just confirmed that the error existed.

I was later able to identify the source of the error and posted again to let you and others know.

Thanks for the quick fix. Can confirm that it now installs correctly.

Many thanks to both of you ... Re-Installed.

Pandemikk 04-06-2012 03:57 PM

Quote:

Originally Posted by angeljs (Post 2317413)
This is a fab mod! It would be great if one could select multiple forums for each message, instead of one at a time. :)

v2.0.0 will have the option for multiple forums and messages per-instance. :)

Mr_Running 04-06-2012 04:01 PM

Quote:

Originally Posted by Pandemikk (Post 2317405)
You can use BBCodes in all messages and phrases. However, they will only show up on WYISIWY mode.

I'm going to hold off on branching to threads (assuming that's what you meant) and other areas where the editor is present for now.

Sweet about can use BBCodes in WYISIWY mode.

Yes I was thinking threads, usercp...Going Global :)

angeljs 04-06-2012 06:11 PM

Quote:

Originally Posted by Pandemikk (Post 2317429)
v2.0.0 will have the option for multiple forums and messages per-instance. :)

Yay! Looking forward to that, then :)

Mr_Running 05-06-2012 07:04 PM

It's going to be great when should I start drooling. :)

renes2 05-16-2012 04:07 PM

Is there a way, that when i click on the editor, the Quote "DEM" dissapear?

PS: Found a Bug with Preview Funktion:
After i wrote my post and hit Preview, the editor shows me a White Editor, pls fix!

Mr_Running 05-16-2012 10:03 PM

Quote:

Originally Posted by renes2 (Post 2329912)
Is there a way, that when i click on the editor, the Quote "DEM" dissapear?

See Mr. Running's post for screenshots on how to remove message wrap-arounds. :) See Mod Notes


All times are GMT. The time now is 04:53 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.02595 seconds
  • Memory Usage 1,888KB
  • 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
  • (5)bbcode_code_printable
  • (28)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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