Remove “Smileys” text from Publish screen
Posted: 27 December 2005 05:19 PM   [ Ignore ]  
Research Assistant
RankRankRank
Total Posts:  345
Joined  10-25-2005

I’ve disabled Smileys in the Emoticon general prefs hoping that would remove the “Smileys” option from the Publsih screen.

Anyway to remove this “Smileys” text from the Publish page?

In trying to make EE a viable option to clients not having a link for “Smileys” on the page they go to to edit their web site content would go a long way in helping pass EE off as a business-class CMS.

 Signature 

DeGeeked: Simple answers to tech questions.

Profile
 
 
Posted: 27 December 2005 06:14 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

You can use extensions to rewrite the publish page- but in this case, I think I’d do a simple hack.  In system/cp/cp.publish.php, around line 4520 you’ll see the link defined:

$smileys = ' <a href="javascript:void(0);" onclick="showhide_smileys(\''.$id.'\');return false;"><b>'.$LANG->line('emoticons').'</b></a>'.$spacer;
$smileys = '';

Well- that second $smileys isn’t there- but if you add it in, the link would no longer appear.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 28 December 2005 09:11 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  345
Joined  10-25-2005

Well, that’ll do it. I searched on “smiley” in BBEdit looking for such a line, but it didn’t turn up anything… Who knows, maybe I had case-sensitivity on and used a capital “s”. Regardless, thanks!

 Signature 

DeGeeked: Simple answers to tech questions.

Profile
 
 
Posted: 24 June 2006 11:16 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  860
Joined  01-07-2003

Good little hack. . .  although, I’m not a fan of hacks as is one more thing to do each time we update builds or versions. Maybe this will become a radio button option some day.

 Signature 

eeSiteKit | the faster way to build an ExpressionEngine website | NetRaising is a member of the EE Pro Network

Profile
 
 
Posted: 22 November 2006 10:38 AM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1839
Joined  03-26-2006

Is there an extension for this now…or a built-in option to disable them? I need to pass off a couple sites as having a business-class CMS as well.

cheese

I don’t want to hack *anything*. That just makes upgrading that much more of a pain.

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 09 July 2007 11:42 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  4
Joined  06-14-2007

So….anyone discovered a better way to do this rather than hacking it?

Thanks

Profile
 
 
Posted: 10 July 2007 06:37 AM   [ Ignore ]   [ # 6 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1839
Joined  03-26-2006

I’ve written an extension now (for something else...), so I’ve gotten my feet wet. I might try my hand at this to see if I can get it to work. Or disappear, as the case may be.

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 10 July 2007 08:11 AM   [ Ignore ]   [ # 7 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1839
Joined  03-26-2006

I have an extension 99% written - it works if I hardcode an id into a string. If someone can offer a little assistance with one line, then I can release this into the wild.

I need a regular expression that will find any number (because each textarea has a unique ID, it appears). I think I need to do a preg_replace. Let’s say I’m looking for this:

onclick="showhide_smileys('3');"


That number change depending on your custom fields, etc. I need a line that looks for that, but replaces that ‘3’ (or ‘2’ or whatever it happens to be) with a regexp that says “any number”. I tried something like this:

onclick="showhide_smileys('\[\d+\]');


but I couldn’t seem to get it working this morning, and I have some paying work to get to.

I’m very close, I think! If anyone can help straighten out this line, then I think it might be good to go:

$out = preg_replace("#<a href=\"jscript:void(0);\" onclick=\"showhide_smileys('\[\d+\]');return false;\"><b>Smileys</b></a>&nbsp;&nbsp;&nbsp;&nbsp;\|&nbsp;&nbsp;&nbsp;&nbsp;#", '', $out);

Image Attachments
nosmileys.png
Click thumbnail to see full-size image
 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 10 July 2007 11:00 PM   [ Ignore ]   [ # 8 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1839
Joined  03-26-2006

OK, I wrote an extension that I think will at least hide the “Smileys” link on the Publish screen: Hide Smileys Link in Control Panel. If you have any issues, leave a note in that thread!

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 17 July 2007 10:05 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  154
Joined  09-28-2002

Nice work on the extension, but isn’t this a bug? Disabling the functionality should also hide the link.

Profile
 
 
Posted: 17 July 2007 10:21 AM   [ Ignore ]   [ # 10 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1839
Joined  03-26-2006

I don’t know that it’s a bug. I wish there were an option to hide the Smileys link when you choose whether or not to allow emoticons. The thing is - I’m only hiding the link, but if you look at the code of the page, all the Smileys code is still there.

There may be a reason that EllisLab chose to keep the Smileys link here, though. I’m not sure. I’m fairly close to beefing this extension up so you can remove Spelling and/or Glossary if you want, too. It would be a LOT easier if these links had classes, but they don’t so I’m trying to do this with regular expressions…which aren’t treating me very nicely.

At least you can remove Smileys for now!

 Signature 

ryan masuga
—————
Masuga Design | Member, EE Pro Network
My EE Add-Ons | {devot:ee}
Twitter: masuga | masugadesign | devot_ee

Profile
 
 
Posted: 19 September 2007 04:38 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  171
Joined  11-22-2006

I have tried both Robin’s hack and mdesign’s extension but they both have the same problem.
The page still tries to load all the smiley image files and showing on the server error log as missing files (I have deleted the images on my server).

I view smileys with the same disdain as clip art, they have no place on a corporate / serious website and it would be good if EE can offer a proper disable option.

 Signature 

pfweb.co.uk

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66396 Total Logged-in Users: 34
Total Topics: 84731 Total Anonymous Users: 16
Total Replies: 454736 Total Guests: 187
Total Posts: 539467    
Members ( View Memberlist )
Newest Members:  tom2000kalkalmohanraoelcisyncronosDan Kingsburypaulgoodeanugrah1986gregandkariSoliq