Advertisement:

Author Topic: [SOLVED] Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?  (Read 3551 times)

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Hi Guys

How could I get WYSWYG HTML Editor for 'Edit Listing' on Admin Panel just like the one we have for 'Edit Page' . Any advise will be much appreciated.

Thanks!
« Last Edit: April 12, 2015, 11:30:44 pm by BritWeb »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #1 on: April 12, 2015, 01:04:06 pm »
Hi,

You can get that installing Rich Edit plugin. It's used both for Admin and public posting/editing, but if you want to restrict it only to Admin, it can be easily achieved.

Regards

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #2 on: April 12, 2015, 02:12:26 pm »
Many thanks, teseo, for the prompt response. I will check this out.

Regards!

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #3 on: April 12, 2015, 05:33:40 pm »
H teseo

I have installed 'Rich Editor' plugin. How do I make it, not show on the 'Item Post' page?

Sorry to pester you!

Kind regards!
« Last Edit: April 12, 2015, 07:04:57 pm by BritWeb »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #4 on: April 12, 2015, 07:07:30 pm »
***CORRECTED***

I don't know that editor, but using the already integrated TinyMCE and restricting it to Admin side, seems to me a good enough solution. You can achieve that just adding this line at the very bottom of your theme functions.php (take care not to leave blank lines after this):

Code: [Select]
<?php $is_admin strstr("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"osc_admin_base_url());
      if (!
$is_adminosc_remove_hook('init''rich_edit_init'); ?>


Regards
« Last Edit: August 07, 2015, 12:43:06 pm by teseo »

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #5 on: April 12, 2015, 08:33:21 pm »
Hi teseo

Thank you for the help again. The already integrated TinyMCE works for 'Manage Pages' on the Admin panel but doesn't show for 'Edit Listing' page. I have installed the 'rich edit' plugin and the editor shows on both 'Edit Listing' page on the admin panel and 'Item Post' page.

I do not want it to show on the 'Item Post' page. The code you suggested didn't resolve it and can you suggest a different approach, please.

Thanks!
 
« Last Edit: April 12, 2015, 08:56:09 pm by BritWeb »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #6 on: April 12, 2015, 09:06:36 pm »
???

Working perfectly for me with Osclass 3.5.6 using Bender or Modern. Don't know what's happening to you... ???

Regards

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: Getting WYSWYG HTML Editor for 'Edit Listing' on Admin Panel, how?
« Reply #7 on: April 12, 2015, 11:30:18 pm »
Hi teseo

My apologies, I was on Osclass 3.5.3 and obviously your code didn’t work. It worked like a charm as soon as I have upgraded to 3.5.6.

Many, many, many thanks for helping me out.

Regards!

Johnny

  • Newbie
  • *
  • Posts: 3
I tried the code given by teseo using patricia theme but it did not work for me. Any suggestions why that might be the case? Any help would be greatly appreciated.

Regards,

teseo

  • Hero Member
  • *****
  • Posts: 6169
Hi,

Sorry, I don't have that theme, you should ask to frosticeck about this in his Patricia theme thread.

Regards

Johnny

  • Newbie
  • *
  • Posts: 3
Thank you for your reply teseo, I appreciate it. Let me go bug frosticeck

teseo

  • Hero Member
  • *****
  • Posts: 6169
Now that I'm seeing your post in the Patricia theme, it occurs to me: Have you tried this procedure on item post without being logged in on Admin Dashboard? ???

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Yes, teseo. It's OK when not logged in as 'admin'

Thanks

teseo

  • Hero Member
  • *****
  • Posts: 6169
Anyway, as many people here are admins and likely will find themselves in the same situation, seems that just using osc_is_admin_user_logged_in() is not enough. ??? I'll see how to better address this matter. I'll get back to you.

Regards

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
maybe do a check on page / action in this case on top of the  osc_is_admin_user_logged_in() ?

Regards,
Eric

Anyway, as many people here are admins and likely will find themselves in the same situation, seems that just using osc_is_admin_user_logged_in() is not enough. ??? I'll see how to better address this matter. I'll get back to you.

Regards