Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 03-17-2016, 06:57 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stratis View Post
Ok thanks for the answer Mark.
I will look into turning this into a product tonight where you can set the color, and other attributes of the placeholder, from the settings.
Reply With Quote
  #12  
Old 03-17-2016, 07:18 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I only want the color code to insert to the hook, after that I will find the css to play around
because this does not works to WYSIWYG editor.

But you know better if this can be done as product
Reply With Quote
  #13  
Old 03-17-2016, 10:28 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stratis View Post
I only want the color code to insert to the hook, after that I will find the css to play around
because this does not works to WYSIWYG editor.

But you know better if this can be done as product
Yes, the WYSIWYG editor is an inline document, not a textarea, and so cannot be assigned a placeholder attribute.

In order to change the CSS of the placeholder text, it is best to have CSS selectors loaded so that the code for all the different browsers can be included, and a class name can be assigned to the textarea element.
Reply With Quote
  #14  
Old 03-18-2016, 03:14 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, here is a beta version...I have rrewritten the javascript so that it won't interfere with any other onload functions (like the toolbar tooltips I recently did), use a vbphrase for the placeholder text, and give in the settings an HTML colorpicker for the text color, and allow for any additional CSS to be added:



With those settings, my quick editor looks like:



Let me know what you think...
Attached Images
File Type: png markfl_editorplaceholder_acp.png (31.8 KB, 0 views)
File Type: png markfl_editorplaceholder_editor.png (25.1 KB, 0 views)
Attached Files
File Type: xml product-markfleditorplaceholder.xml (5.7 KB, 4 views)
Reply With Quote
  #15  
Old 03-18-2016, 03:31 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great plug in Mark!

OP: I can see this being useful but if not used correctly I could also see it displaying the same text with every post which would be terrible for seo.
Reply With Quote
  #16  
Old 03-18-2016, 03:39 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
This is a great plug in Mark!

OP: I can see this being useful but if not used correctly I could also see it displaying the same text with every post which would be terrible for seo.
It only displays in the empty editor textarea, as soon as you begin typing text in the editor, it disappears.
Reply With Quote
  #17  
Old 03-18-2016, 03:49 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah in that case PERFECT!!!! I think I may use this! Thanks Mark!:up::up:
Reply With Quote
2 благодарности(ей) от:
MarkFL, Stratis
  #18  
Old 03-18-2016, 04:07 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok Mark i will test it, thanks you.

--------------- Added 18 Mar 2016 at 08:56 ---------------

Well, it seems i have some issues.
* it does not work in IE11 & Edge
* it works with Firefox & Chrome
* even if change phrase "Enter Post Here..." in $vbphrase[markfl_editorplaceholder_text] does not take effect, it shows the default text.

* CSS change works.

EDIT:
*Have in my mind, as default, quick reply is open, users don't need to press to see.
*The first hook test before this modification, did not work in all browsers either.


Thanks...
Reply With Quote
Благодарность от:
MarkFL
  #19  
Old 03-18-2016, 07:44 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found what is causing the half issue.

Attachment 154527

Plugin "Add Placeholder To Editor" is disabled.


As i saw in xml file "<plugin active="0" executionorder="5">" active is to "0"
is this how its supposed to be? Any way when i activate the specific plugin
changes to phrase works fine.

Still only works with Firefox & Chrome

EDIT:
One more, in "Text Formatting" option, works only what i put first.
Example
font-size: 1.3em;
background: #FFFF1A;

Only first "font-size works", if i change order, than only "background" works.

Trim?

Thanks
Reply With Quote
  #20  
Old 03-18-2016, 12:31 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is an update...and I'm not surprised IE fails...it marches to the beat of a different and deranged drummer.
Attached Files
File Type: xml product-markfleditorplaceholder.xml (5.0 KB, 4 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:23 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.04526 seconds
  • Memory Usage 2,294KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete