Page 1 of 1
From which file does this code come?
Posted: Thu May 22, 2008 6:12 pm
by usr
Hi there,
i've just installed serendipity, it all works quite well. However there is still a little problem.
If i'm visiting my blog and view the sourcecode in the browser, there is a line like this:
Code: Select all
<td id="serendipityRightSideBar" valign="top"> <div class="serendipitySideBarItem container_serendipity_superuser_plugin">
<h3 class="serendipitySideBarTitle serendipity_superuser_plugin">Verwaltung des Blogs</h3> <div class="serendipitySideBarContent"><a href="https://xxxxxxx.net/index.php?/admin" rel="nofollow" title="Login">Login</a></div>
I would like to change the url in the last line of the code. I've searched the ftp for hours, but i didn't find the correct file. If i'm oppening the index.php on the ftp, it looks completly different than the one the webserver is serving.
I guess its because its dynamically generated, right?
Would be really great if someone could me name the file, where to find the 3 line of codes from above.
And yes: i've searched nearly the complete ftp, including the plugin and template folders etc. Not just the index.php...
Thanks a lot, usr

Re: From which file does this code come?
Posted: Thu May 22, 2008 6:28 pm
by garvinhicking
Hi!
This comes from the serendipity "Superuser login" plugin. The PHP code is in include/plugin_internal.inc.php, the class serendipity_superuser_plugin.
Maybe if you want your own link there, you should simply add a HTML Nugget plugin and then insert the code that you would like to see/have.
HTH,
Garvin
Posted: Thu May 22, 2008 8:25 pm
by usr
The problem is: when i want to login to write entrys, the ssl-connection doesn't work correct. I spoke with my hoster, and he advised me to make the url relative like xxxx.php, instead of
https://bla.net/xxxx.php
I will try in some minutes and report back. Thanks!
edit: The browser is complaining that not all the data was encrypted beforce sending over the net. And i hope with a relative url instead of absolute it will work.

Posted: Thu May 22, 2008 9:41 pm
by usr
The code looks like this:
Code: Select all
class serendipity_superuser_plugin extends serendipity_plugin {
var $title = SUPERUSER;
function introspect(&$propbag)
{
$propbag->add('name', SUPERUSER);
$propbag->add('description', ALLOWS_YOU_BLAHBLAH);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.0');
$propbag->add('configuration', array('https'));
$propbag->add('groups', array('FRONTEND_FEATURES'));
}
function generate_content(&$title)
{
global $serendipity;
$title = $this->title;
if ($this->get_config('https', 'false') == 'true') {
$base = str_replace('http://', 'https://', $serendipity['baseURL']);
} else {
$base = $serendipity['serendipityHTTPPath'];
}
$link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN;
$text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN);
echo '<a href="' . $link . '" rel="nofollow" title="'. $text .'">'. $text .'</a>';
}
function introspect_config_item($name, &$propbag)
{
switch($name) {
case 'https':
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_SUPERUSER_HTTPS);
$propbag->add('description', PLUGIN_SUPERUSER_HTTPS_DESC);
$propbag->add('default', 'false');
break;
default:
return false;
}
return true;
}
}
I've tested different things, but it didn't work out. I would like to give serendipity the relative path to the admin.php file, not the absolute one like "'serendipityHTTPPath". I've changed various things, including "<a href="'index.php?/admin'" rel="nofollow" title="'. $text .'">
But this doesn't work either. What am i doing wrong? Any suggestions?
Thanks!
Posted: Thu May 22, 2008 10:23 pm
by usr
Allright: finally SSL is working correctly...
Just one last question: how can i delete the words "Verwaltung des Blogs" and the line between "Verwaltung" and "Login".
I want to see only "Login"
Thanks a lot!
Posted: Fri May 23, 2008 12:26 am
by Don Chambers
Try this in your template's stylesheet:
Code: Select all
.container_serendipity_superuser_plugin .serendipitySideBarTitle {
display: none !important;
}
I only put the !important in there because I am not sure how your template otherwise defines rules for the sidebar containers, and the sidebar title.
Posted: Fri May 23, 2008 12:56 am
by usr
Sorry, maybe i'm a little bit stupid. :/
I'm using "mt-trendy", and looked in the folder: there are only two .css files, both don't contain your code. I've searched also for it in the "default" folder, and viewed the index.tpl and sidebar.tpl, but the was also no success.
Where do i have to search? :/
Sorry.
Posted: Fri May 23, 2008 1:04 am
by Don Chambers
Open that template's style.css file... look for this:
Code: Select all
/* Sidebars */
#serendipityLeftSideBar,
#serendipityRightSideBar {
background-color: #333333;
color: #cccccc;
display: block;
margin-top: 35px;
padding: 10px;
vertical-align: top;
}
.serendipitySideBarTitle {
border-bottom: 1px solid #666666;
color: #cccccc;
margin: 0;
font-size: x-small;
font-weight: bold;
padding-left: 2px;
text-transform: uppercase;
}
div.serendipitySideBarItem {
color: #666666;
font-size: small;
font-weight: normal;
margin-bottom: 12px;
padding-bottom: 12px;
}
And right after that last block, add this one:
Code: Select all
.container_serendipity_superuser_plugin h3.serendipitySideBarTitle {
display: none;
}
Posted: Fri May 23, 2008 1:24 am
by usr
Working. Thanks so much!

Posted: Fri May 23, 2008 3:05 am
by Don Chambers
Happy to help!