Somewhere this script extension but somewhere not…Don’t quite understand that part, sorry! What should the site name be? All this Ext does is take what is found in this field: CP Home > Admin > System Preferences > General Configuration > Name of Your Site and put it in the header. Is yours blank for some reason? 😊
I’m disabled Clone Entries (v.1.0) extension, and Site Name shown. Could you check both extension where is the conflict? Thank you.
I just updated this extension to version 1.1.0 (see top of thread), which now has settings for font-size, making the site name a link to your site’s homepage, color, font-weight, font-family, and padding on the top and the bottom (in case changing the size of the text messes the layout up at all). I attached a pic showing a sample modified site name in bold, light green Trebuchet at 16px.
I looked a little bit at the extension conflict with Cloner, and all I could see was that where they’re using the same hook as I am, it doesn’t look like they used the last call code you’re supposed to use:
if($EXT->last_call !== false)
{
$out = $EXT->last_call;
}
I could be totally wrong though, as I’m still new at writing extensions. If I figure out anything, I’ll let you know.
UPDATE: As far as I could tell in Cloner, around line 181 is this:
$DB->query($DB->insert_string('exp_extensions',
array(
'extension_id' => '',
'class' => "Cloner",
'method' => "remove_entryid",
'hook' => "show_full_control_panel_end",
'settings' => "",
'priority' => 10,
'version' => $this->version,
'enabled' => "y"
)
)
);
Changing the ‘priority’ line from 10 to 9 works for me:
'priority' => 9,
I’m not entirely sure what that did though, but it does get them to play nice together.
mdesign: yeah, either works fine. Great job! What’s about possibility adding the graphic logo of the site before the name or allowing show logo alone?
I thought about the logo, but there seem to be a lot of things to consider with that. The size of the header might change based on the logo height, the logo might look bad on that blue background. Do you upload through the extension’s CP page (and where does that upload to?), or just FTP the logo up to a server and point to it from the CP page? Should there be max widths and heights imposed? Some logos will look horrible with tiny limits in place, while others might be fine. Is there an easier way to do this than through this extension?
I’m sure I could think of a number of other possible issues. Besides, the name of this extension is “Add Site Name”, not “Add Site ID”, although if a logo option were added, I might need to change the name to something more clever and EE-like, like “Site IDee (idEE?)”
It would be nice too if I could get this to work with the CP login page! But I don’t know if there is a hook for that or not.
I thought about the logo, but there seem to be a lot of things to consider with that. The size of the header might change based on the logo height, the logo might look bad on that blue background …
How bout a limited ability?
16x16? 32x32?
I doubt anyone would want to have an oversized 100px+ logo in their header. Besides, the intent of this extension (properly used) is to identify/personalize your control panel, right? As for the colored background, perhaps an option where the user can enter a hexidecimal value that would become the background for the (xLOGOx + SiteName + ExpressionEngine v.xyz).
😊
GREAT extension BTW!
I just updated this extension to 1.1.1 with a new setting: Text Override. Basically, I have a lot of other work to do, and I’m just procrastinating today.
You can now make the text say whatever you want. Might be handy to designate “development” sites, shorten a real long name, play a prank, or whatever. The field is totally optional and will just default to your site name.
See attached sample pic here, showing a “dev” note - and grab the latest version in the first post of this thread.
Or better yet, have it just try to find the favicon on your site.
I think that’s way to go. I just need to think of the logic: New setting: “Show favicon?” If that is set to “yes” (it being set to “no” by default), then look for the favicon, and center it to the left of your site name.
What do you think, jammo?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.