WordPress.org

Ready to get started?Download WordPress

Forums

WP 1.5 : quicktags for Safari (26 posts)

  1. tgjb
    Member
    Posted 9 years ago #

    If you're using Safari to write posts, quicktags buttons don't appear.

    The solution is to comment two lines (569, 577) in "wp-admin/comments-functions.php"

    Change this :
    function the_quicktags () {
    // Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
    if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) :
    echo '
    <div id="quicktags">
    <a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>:
    <script src="quicktags.js" type="text/javascript"></script>
    <script type="text/javascript">edToolbar();</script>
    ';
    echo '</div>';
    endif;
    }

    in

    function the_quicktags () {
    // Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
    //if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) :
    echo '
    <div id="quicktags">
    <a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>:
    <script src="quicktags.js" type="text/javascript"></script>
    <script type="text/javascript">edToolbar();</script>
    ';
    echo '</div>';
    //endif;
    }

    The buttons are not beautiful, but now they appear !!

  2. Rusyn
    Member
    Posted 9 years ago #

    "wp-admin/comments-functions.php"

    I don't have this file... (;_;)

  3. Rusyn
    Member
    Posted 9 years ago #

    wp-admin/admin_functions.php

    Around line 536

    Cheers!

  4. James
    Happiness Engineer
    Posted 9 years ago #

    Are you sure that you have javascript enabled in Safari? I've never had any problems displaying the quicktags buttons. Using Safari 1.2.4 (v125.12)

  5. Rusyn
    Member
    Posted 9 years ago #

    Once I enabled them in the code they work fine. They used to work no problem in WP 1.2 ... I dunno what this Safari Javascript problem is...

  6. tgjb
    Member
    Posted 9 years ago #

    Ooops !! Thank you for the correction Rusyn !!

    The file to edit is "wp-admin/admin-functions.php" !!

    Excuse me for my mistake !!

  7. James
    Happiness Engineer
    Posted 9 years ago #

    Still not working, even in the official v1.5 release, which is odd considering that they worked in v1.2.x. Anywho, your hack worked, thanks!

  8. bkoplin
    Member
    Posted 9 years ago #

    This worked perfectly in Safari. Thanks!

  9. jlundell
    Member
    Posted 9 years ago #

    The suggested fix makes the buttons reappear, but as with 1.2.x, the cursor ends up before the inserted tag instead of after it. Works OK in Firefox, bad in Safari.

  10. James
    Happiness Engineer
    Posted 9 years ago #

    "... but as with 1.2.x, the cursor ends up before the inserted tag instead of after it."

    This is why quicktags for Safari were disabled in WP v1.5.

  11. jlundell
    Member
    Posted 9 years ago #

    Thanks; I thought that might be the case. The comment re Safari JS support could be a little more explicit.

  12. serif
    Member
    Posted 9 years ago #

    Thanks for this post - I was wondering where those were! Now working fine for me in Safari.

  13. georg
    Member
    Posted 9 years ago #

    "This is why quicktags for Safari were disabled in WP v1.5."

    Does it actually mean that Qucktags are never going to work in Safari?

  14. Aron
    Member
    Posted 8 years ago #

    I too have expierenced this problem. I have no quicktags area in my "write post" page and there is nothing in Safari (I know of the problem with quicktags and Safari). On a mac or PC nothing in IE. I have used the newest quicktags.js and have gone so far as to delete my entire WP site, less the wp_content folder and config.php, but even witha fresh start there is not any signs of Quicktags. I did have them in WP 1.2 however, since the upgrade they have vanished. I don't even have an area in my compose page for them.
    Ideas welcome. Adimittley I am no PHP genius, but am lost for any answer.

  15. susurrate
    Member
    Posted 8 years ago #

    I've followed the procedure above, and the Quick Tags buttons now appear. However, I get the following errors at the top of every admin page now. I have tried Googling and looking elsewhere and can't find a fix for this - can anyone advise me what to do to fix this? Thanks

    Warning: Cannot modify header information - headers already sent by (output started at /home/susurrat/public_html/wp-admin/admin-functions.php:1042) in /home/susurrat/public_html/wp-admin/admin.php on line 6

    Warning: Cannot modify header information - headers already sent by (output started at /home/susurrat/public_html/wp-admin/admin-functions.php:1042) in /home/susurrat/public_html/wp-admin/admin.php on line 7

    Warning: Cannot modify header information - headers already sent by (output started at /home/susurrat/public_html/wp-admin/admin-functions.php:1042) in /home/susurrat/public_html/wp-admin/admin.php on line 8

    Warning: Cannot modify header information - headers already sent by (output started at /home/susurrat/public_html/wp-admin/admin-functions.php:1042) in /home/susurrat/public_html/wp-admin/admin.php on line 9

    Warning: Cannot modify header information - headers already sent by (output started at /home/susurrat/public_html/wp-admin/admin-functions.php:1042) in /home/susurrat/public_html/wp-admin/post.php on line 452

  16. susurrate
    Member
    Posted 8 years ago #

    Hold on, found a solution, inevitably just after posting. Sorry to have wasted your time reading my earlier post. :)

  17. Tristan
    Member
    Posted 8 years ago #

    thanks for the hack...this was driving me mad!!

    *is too lazy to insert the appropriate html codes by hand*

  18. toughIQ
    Member
    Posted 8 years ago #

    hi,
    i just made the changes suggested here to the admin-functions.php
    positive: i get the quicktags now when using safari.
    negative: they dont seem to work properly...when i highlight a word and want to set it to BOLD for example, the tag isnt set at this position...instead the opening tag is set to the end of the line....
    hmm....
    any ideas?

    bye, chris

  19. nieuws
    Member
    Posted 8 years ago #

    I haven't changed anything and Safari does its job just fine over here.

  20. Ecotrend
    Member
    Posted 8 years ago #

    Following the simple line change, suggested at the top of the page, worked fine for me! Looks OK is Safari as well.

  21. japanwindow
    Member
    Posted 8 years ago #

    I have someone using my site with Safari, so I made the suggested change, but then I couldn't get into the admin (dashboard/post/etc) section at all. There was some type of error and a blank screen. After removing the changes everything was back to normal. Doas anyone know why this hack doesn't work for me? I'm using the latest WP, Firefox, Rin's template (adjusted), etc.

  22. 3stripe
    Member
    Posted 8 years ago #

    Has anyone had any success using this hack in conjunction with the Tiger Admin theme?

    I still can't see any Quicktage in Safari 1.3.1...

    http://orderedlist.com/articles/wordpress-administration-design-tiger/

  23. chasmyn
    Member
    Posted 8 years ago #

    Will this hack work with WP 2.0?

  24. James
    Happiness Engineer
    Posted 8 years ago #

    Probably. Once I upgrade my blogs to v2.0, I will work on a hack to allow the quicktags and the new rich editor to appear (depending on user preference) for Safari users.

  25. James
    Happiness Engineer
    Posted 8 years ago #

    I have upgraded the "Quicktags in Safari" hack to be compatible with WordPress v2.0. Unfortunately, I can't get the new Rich (WYSIWYG) Editor to appear, but that might be a good thing, since the Rich Editor in earlier builds of v2.0 (fka v1.6) caused Safari to crash instantly.

    http://codex.wordpress.org/FAQ_Troubleshooting#Why_can.27t_I_see_the_Quicktag_buttons_when_using_Apple.27s_Safari_browser.3F

  26. James
    Happiness Engineer
    Posted 8 years ago #

    Well, I wasn't able to enable the visual rich editor (aka "the WYSIWYG editor") without it causing Safari to crash as it had done in earlier builds of v2.0 (fka v1.6). Fortunately, I have found a suitable alternative. More information is available in this FAQ:

    http://codex.wordpress.org/FAQ_Troubleshooting#Why_can.27t_I_see_the_visual_rich_editor_when_using_Apple.27s_Safari_browser.3F

Topic Closed

This topic has been closed to new replies.

About this Topic