PDA

View Full Version : New Posting Features - Default Editor Messages


Pandemikk
04-04-2012, 10:00 PM
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 (https://vborg.vbsupport.ru/showpost.php?p=2317385&postcount=30).

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
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
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.

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
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
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/admincp/dem.php?do=modifymessage
Referrer : http://www.prosportsinteractive.net/admincp/index.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/admincp/dem.php?do=modifyinstance
Referrer : http://www.prosportsinteractive.net/admincp/index.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
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/admincp/dem.php?do=modifymessage
Referrer : http://www.prosportsinteractive.net/admincp/index.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/admincp/dem.php?do=modifyinstance
Referrer : http://www.prosportsinteractive.net/admincp/index.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
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 [Quote]and maybe when you start typing the message disappears. :)

Pandemikk
04-05-2012, 03:31 PM
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
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
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
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
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
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/admincp/dem.php?do=modifymessage
Referrer : http://www.prosportsinteractive.net/admincp/index.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/admincp/dem.php?do=modifyinstance
Referrer : http://www.prosportsinteractive.net/admincp/index.php?do=nav
IP Address : 24.94.41.199
Username : Mike
Classname : vB_Database
MySQL Version : 5.0.92-log

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?

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
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". :)


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.

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
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
v1.2.0

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


Add Space Key
pan_dem_editor_replace_begin
137594



Add Space Key
pan_dem_editor_replace_end
137595




To remove the message default

Add Space Key
pan_dem_message_default_end
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
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
It may make zero sense but I can confirm that it happens. Also using vBSEO with vBulletin 4.1.11 PL1.

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". :)

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.



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
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
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
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
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

hsoen
11-13-2012, 06:38 AM
Installed, work for Safari browser but not google Chrome.

What is wrong?

Mr_Running
01-27-2013, 05:19 PM
Okay, I turned this mod off for a long time waiting for 2.0 but I used it for the last month but discovered that once a title is entered and the Tab is clicked on the keyboard to start the message the cursor will not go into the editor.

Myself...I use the mouse but some users tend to use the tab button.

So Yeah, it works with the mouse but not the Tab.

Pandemikk
02-05-2013, 07:59 PM
I didn't know people were still interested in this mod.

hsoen: I can't really help you until you describe what exactly doesn't work.

Mr. Running: I'm sorry to keep you waiting, but as you know I have taken a leave from coding. I'll still be happy to assist you on this modification, however, and will start by commencing work on v2 (hopefully I still have files around somewhere!).

I will look into the tab version and see if I can replicate this issue.