Posts: 687
Threads: 63
Joined: Nov 2011
Many people don't understand clicking the title of their site in the admin area will bring them to the home page. This plugin adds a tab called "View Site" in the admin.
http://get-simple.info/extend/plugin/viewsitelink/507/
Known Bugs:
-Showing "View Site" at top of all pages in /admin and front end. (FIXED IN 1.1)
-Causing some problems with the admin interface (FIXED IN 1.1)
-View Site Link not linking to correct location (FIXED IN 1.1)
Posts: 1,247
Threads: 82
Joined: Feb 2011
2012-09-25, 16:30:36
(This post was last modified: 2012-09-25, 16:35:23 by netmaster.)
That functionality allready exists in the core (at least since GetSimple version 2):
The view button on this screenshot:
Also, yours doesn't work. it revers to "site adress"/admin/$SITEURL
Edit: Actually this seems to be part of your description:
Quote:Known Bugs:
-View Site Link not linking to correct location (to be fixed in 1.1)
Why do you upload a plugin where the main functionality doesn't work at all yet?
Posts: 6,266
Threads: 181
Joined: Sep 2011
Why not just stick a link after the title that says view site.
Or a hover tip on the title, its fairly standard to click the title to link to home. But i can see how people do not know this.
use jquery to append to the dom
Posts: 687
Threads: 63
Joined: Nov 2011
Sorry about the bugs,
Version 1.1 will be out very soon!
Its not intended to view the page you just edited. Its simple meant to be used in addition to the big title link, for most clients that aren't computer savvy and don't realize they need t click the title.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Heres a suggestion since I have already considered this,maybe you will like this solution.
There is a hook for nav-tab
you can insert this ad it will be next to the little pills for settings and support.
Code: <li class="rightnav"><a class="first" href="" style="
border-radius: 3px;
margin-left: 3px;
border-left: none;
">View Site</a></li>
Posts: 687
Threads: 63
Joined: Nov 2011
OK do you think I should put it there, or in the tabs where I originally put it?
Or both?
Thanks!
Posts: 1,108
Threads: 70
Joined: Aug 2009
I think it looks better beside the settings and supports buttons.
M
Posts: 6,266
Threads: 181
Joined: Sep 2011
Tabs are meant to be pages not really links.
Posts: 687
Threads: 63
Joined: Nov 2011
OK I'll look at it which I think looks best. Thanks for the feedback
Posts: 687
Threads: 63
Joined: Nov 2011
Alright, well now I don't understand why my plugin is breaking the admin interface.
It's not showing its information in the Plugins tab, and it's generally causing problems in the admin interface.
I have a feeling once this plugin is working perfectly, I will have learned more about how GetSimple works so I won't have to ask stupid questions
Here's my code:
Code: <?php
/*
Plugin Name: ViewSiteLink
Adds an obvious link in admin navigation that opens home page in new tab.
Version: 1.0
Author: Michel Staake
Author URI: http://michelstaake.me/
*/
$viewsitelink=viewsitelink(__FILE__, ".php");
register_plugin(
$viewsitelink,
'ViewSiteLink',
'1.0',
'Michel Staake',
'http://michelstaake.me/',
'Adds an obvious link in admin navigation that opens home page in new tab.',
'plugin',
'viewsitelink'
);
add_action('nav-tab','viewsitelink');
function viewsitelink() {
echo '<li class="rightnav"><a target="_blank" class="first" href="" style="
border-radius: 3px;
margin-left: 3px;
border-left: none;
">View Site</a></li>';
}
?>
Posts: 357
Threads: 23
Joined: Dec 2009
Hello,
i think that it should be so:
Code: <?php
/* Plugin Name: ViewSiteLink
Adds an obvious link in admin navigation that opens home page in new tab.
Version: 1.0
Author: Michel Staake
Author URI: http://michelstaake.me/
*/
$viewsitelink=basename(__FILE__, ".php");
register_plugin(
$viewsitelink,
'ViewSiteLink',
'1.0',
'Michel Staake',
'http://michelstaake.me/',
'Adds an obvious link in admin navigation that opens home page in new tab.',
'plugins',
'viewsitelink'
);
add_action('nav-tab','viewsitelink');
function viewsitelink() {
global $SITEURL;
echo '<li class="rightnav"><a target="_blank" class="first" href="'.$SITEURL.'" style="
border-radius: 3px;
margin-left: 3px;
border-left: none;
">View Site</a></li>';
}
?>
Regards.
Posts: 687
Threads: 63
Joined: Nov 2011
Hello, version 1.1 has been released!
Thank you to all who helped, I am now less confused on how this whole thing works!
http://get-simple.info/extend/plugin/viewsitelink/507/
Posts: 687
Threads: 63
Joined: Nov 2011
Version 1.2 has been released. It has no functionality differences, you don't need to update, but some of the text and descriptions have been changed.
Posts: 161
Threads: 6
Joined: Jan 2010
An alternative solution if you use the Custom Admin CSS plugin is the following CSS. It just adds a faux tooltip when you hover the title in the back-end:
Code: .header h1 a:hover:after {
z-index: 10;
margin: .8em;
position: absolute;
padding: .5em 1em;
content: "View website";
background: rgba(0,0,0,.75);
font:400 11px/1 'open sans', sans-serif;
}
If it doesn't work at first, you'll just need to use a better browser.
|