Permalink
Browse files

poweredByLink() added to cms.php mini1 and content updated accordingly

languages/de.php updated for sitemap

git-svn-id: http://svn.code.sf.net/p/cmsimplexh/code/trunk@1581 4f8f9682-67af-44ce-aacd-401fd16d96b5
  • Loading branch information...
svasti-xh committed Apr 30, 2015
1 parent e58801c commit 5f051fad2e1ad69bbd11447aa4bbb1ca333102a9
Showing with 192 additions and 28 deletions.
  1. +127 −0 cmsimple/cms.php
  2. +1 −1 cmsimple/languages/de.php
  3. +27 −1 content/content.htm
  4. +11 −6 templates/mini1/stylesheet.css
  5. +24 −20 templates/mini1/template.htm
  6. +2 −0 templates/mini1/template.nfo
View
@@ -1227,6 +1227,133 @@
. file_get_contents($pth['folder']['cmsimple'] . 'legal.txt');
}
/*
* Here begins the group of functions to create the "Site/CMS Info" page.
* To generate this page add <?php echo poweredbylink()?> to the template
* plus a template.nfo file containing a description of the template in
* plain text with link to the designer site totaling up to 400 digits.
*
* Newsbox text titled 'Site/CMS Info' will appear at the beginning
* of the generated page.
*/
if ($su == uenc('site/cms info')) {
$f = $title = 'Site/CMS Info';
$s = -1;
$o .= '<h1>' . $title . '</h1>';
$o .= newsbox('Site/CMS Info') . XH_poweredBy();
}
// 3 functions to show "Site/CMS Info"
/**
* Returns The content of the generated page "Site/CMS Info".
*
* One of the 3 functions to show "Site/CMS Info".
*
* @global array $cf The configuration of the core.
* @global array $tx The language localization of the core.
* @global array $pth The paths of system files and folders.
*
* @return The HTML.
*
* @since 1.7.
*/
function XH_poweredBy()
{
global $cf, $tx, $pth;
$o = '<h5>Content Management System</h5><ul><li><a href="http://cmsimple-xh.org">'
. CMSIMPLE_XH_VERSION . '</a></li></ul>';
$defaulttpl = $tx['subsite']['template'] == ''
? $cf['site']['template']
: $tx['subsite']['template'];
$tpltext = '';
foreach (XH_templates() as $template) {
$tpltext .= $defaulttpl == $template
? '<li><p><strong>Default template: ' . ucfirst($template) . '</strong>'
: '<li>' . ucfirst($template);
if(is_file($pth['folder']['templates'] . '/' . $template . '/template.nfo')) {
$tplinfo = utf8_substr(strip_tags(file_get_contents($pth['folder']['templates']
. '/' . $template . '/template.nfo'), '<a><br><br/>'), 0, 400);
if($tplinfo) $tpltext .= '<br>' . $tplinfo;
}
$tpltext .= '</li>';
}
$o .= '<h5>Templates</h5><ul>' . $tpltext . '</ul>';
$t = '';
foreach (XH_plugins() as $plugin) {
$url = XH_pluginURL($plugin);
if ($url) {
$t .= '<li><a href="' . $url . '">' . ucfirst($plugin)
. '</a></li>';
}
}
$o .= $t? '<h5>Plugins</h5><ul>' . $t . '</ul>' : '';
return $o;
}
/**
* Returns The link to a plugin download site.
*
* One of the 3 functions to show "Site/CMS Info".
*
* @global array $pth The paths of system files and folders.
*
* @param string $plugin The plugin name.
*
* @return string The link.
*
* @since 1.7.
*/
function XH_pluginURL($plugin)
{
global $pth;
$internalPlugins = array(
'filebrowser', 'meta_tags', 'page_params', 'pagemanager' , 'tinymce', 'utf8', 'jquery', 'hi_updatecheck',
);
if (in_array($plugin, $internalPlugins)) {
$url = false;
} else {
$filename = $pth['folder']['plugins'] . $plugin . '/version.nfo';
if (is_readable($filename)) {
$contents = file_get_contents($filename);
$contents = explode(',', $contents);
$url = $contents[5];
} else {
$url = false;
}
}
return $url;
}
/**
* Creates the link to the generated page "Site/CMS Info".
*
* One of the 3 functions to create "Site/CMS Info".
*
* @global string The site (script) name.
*
* @param string $linktext The text to be displayed as the link in the template.
*
* @return string The link.
*
* @access public.
*
* @since 1.7.
*/
function poweredByLink($linktext = '')
{
global $sn;
$linktext = $linktext ? $linktext : 'Site/CMS Info';
return '<a href="' . $sn . '?' . uenc('site/cms info') . '">'
. $linktext . '</a>';
}
if (XH_ADM) {
$_XH_controller->setBackendF();
@@ -292,7 +292,7 @@
$tx['title']['phpinfo']="PHP-Info";
$tx['title']['search']="Suchen";
$tx['title']['settings']="Einstellungen";
$tx['title']['sitemap']="Sitemap";
$tx['title']['sitemap']="Inhaltsverzeichnis";
$tx['title']['sysinfo']="System-Info";
$tx['title']['userfiles']="Andere";
$tx['title']['validate']="Links prüfen";
View
@@ -880,7 +880,7 @@ <h1>News05</h1>
<?php
$page_data[]=array(
'url'=>'News05',
'last_edit'=>'1377011870',
'last_edit'=>'1430395705',
'description'=>'',
'keywords'=>'',
'title'=>'',
@@ -905,4 +905,30 @@ <h4>Newsbox News05</h4>
<p>Diese Box zeigt den Inhalt der versteckten Seite "News05".</p>
<p>Mehr Informationen zum Thema Newsboxen gibt es hier:</p>
<p style="text-align: right;"><a href="http://www.cmsimple-xh.org/wiki/doku.php/de:newsboxes">CMSimple_XH Wiki »</a></p>
<h1 style="text-align: left;">Site/CMS Info</h1>
<?php
$page_data[]=array(
'url'=>'Site%2FCMS-Info',
'last_edit'=>'1430403639',
'keywords'=>'',
'title'=>'',
'robots'=>'',
'heading'=>'',
'show_heading'=>'',
'template'=>'',
'published'=>'',
'show_last_edit'=>'',
'linked_to_menu'=>'',
'header_location'=>'',
'use_header_location'=>'',
'publication_date'=>'',
'expires'=>'',
'description'=>''
);
?>
<p class="important">Since CMSimple_XH 1.7 the template function <strong>&lt;?php echo poweredbylink()?&gt;</strong> is available. The function creates a link to the automatically generated page "Site/CMS Info" and is meant to replace the usual "Powered by CMSimple_XH" link.<br><br>The link text is "Site/CMS Info" which can be changes by &lt;?php echo poweredbylink(<strong>'alternative text'</strong>)?&gt;<br><br>Text at the beginning of the generated "Site/CMS Info" page can be entered via a hidden news box page named "Site/CMS Info".</p>
<h6>Template designers</h6>
<p>All the templates in the templates folder of a site are listed in the generated "Site/CMS Info" page. You can give a free description of your template together with your designer's link in the file "template.nfo" in your template. The file accepts plain text, html links, and &lt;br&gt; or &lt;br/&gt;. </p>
<h6>Plugins</h6>
<p>Except standard plugins all plugins of a site that come with version.nfo file will be listed with a link on the "Site/CMS Info" page.</p>
</body></html>
@@ -358,34 +358,37 @@ h6 {
/**************************/
/* Subnavigation */
/* Previous/Next Page */
/**************************/
.subnav {
width:100%;
padding:0 1em;
box-sizing: border-box;
display: table;
}
.subnav td a {
.subnav a {
text-decoration:none;
color:black;
display:block;
white-space: nowrap;
padding: 0;
}
.subnav td a:hover {
.subnav a:hover {
color:#090;
background-color:#eee;
}
.previous {
.subnav span {
display: table-cell;
width:33%;
}
.previous {
text-align:left;
}
.top {
width:33%;
text-align:center;
}
.next {
width:33%;
text-align:right
}
@@ -398,11 +401,13 @@ h6 {
clear:both;
text-align:center;
font-size:x-small;
letter-spacing: .1em;
margin:1em 0;
}
.copyright a {
color:#777;
text-decoration:none;
padding:.5em;
}
.copyright a:hover {
color:#090;
@@ -2,20 +2,20 @@
<html lang="<?php echo $sl;?>">
<head>
<?php echo head();?>
<!--[if lte IE 6]><style type="text/css">.container{width:70em}.content{width:48em;}.sidebar{width:18em}.newsbox2{width:31em}</style><![endif]-->
</head>
<body id="body" <?php echo onload();?>>
<!--Head Navigation-->
<div class="headnav">
<p>
<?php echo mailformlink();?> &nbsp;
<?php echo sitemaplink();?> &nbsp;
<?php echo printlink();?> &nbsp;
<?php echo languagemenu();?>
</p>
</div>
<!--Head Navigation-->
<div class="headnav">
<p>
<?php echo mailformlink();?> &nbsp;
<?php echo sitemaplink();?> &nbsp;
<?php echo printlink();?> &nbsp;
<?php echo languagemenu();?>
</p>
</div>
<!--Container-->
@@ -76,21 +76,25 @@ <h1><?php echo '<span>'.sitename().'</span>'.sitename();?></h1>
</div>
<!--Next/Previous Page Navigation-->
<table class="subnav">
<tr>
<td class="previous"><?php echo previouspage();?></td>
<td class="top"><?php echo top();?></td>
<td class="next"><?php echo nextpage();?></td>
</tr>
</table>
<!--Previous/Next Page Navigation-->
<div class="subnav">
<span class="previous"><?php echo previouspage();?></span>
<span class="top"><?php echo top();?></span>
<span class="next"><?php echo nextpage();?></span>
</div>
<!--End of Container-->
</div>
<!--Copyright-->
<p class="copyright"><a href="http://www.cmsimple-xh.org/" target="_blank">Powered by CMSimple_XH</a> · <?php echo loginlink();?> ·
<a href="http://www.frankziesing.de/cmsimple/" target="_blank">Template by svasti</a></p>
<div class="copyright">
<?php if (function_exists('poweredbylink')):?>
<?php echo poweredbylink()?> · <?php echo loginlink();?>
<?php else:?>
<a href="http://www.cmsimple-xh.org/" target="_blank">Powered by CMSimple_XH</a> · <?php echo loginlink();?> ·
<a href="http://svasti.de" target="_blank">Template by svasti</a></p>
<?php endif?>
</div>
</body>
</html>
@@ -0,0 +1,2 @@
© 2013-15 by <a href='http://svasti.de'>svasti</a>, simple template with all basic template functions of CMSimple_XH.
<br>Feel free to use it as starting point to develop your own template.

0 comments on commit 5f051fa

Please sign in to comment.