SOLVED | Last edited txt <> link ?
SOLVED | Last edited txt <> link ?
normaly you see at the pag last edited > date.
Is this possible ?
Letts say you have many pages and you update one and at the front page you wanna see the last edited page.
its it possible ? through link to the last selected editing page
Is this possible ?
Letts say you have many pages and you update one and at the front page you wanna see the last edited page.
its it possible ? through link to the last selected editing page
Last edited by twc on Tue Jan 22, 2013 10:31 pm, edited 1 time in total.
Re: Last edited txt <> link ?
Hi twc,
you can store the following as index.php of a new folder under plugins/:
The you can add to the template:
Christoph
you can store the following as index.php of a new folder under plugins/:
Code: Select all
<?php
function latestUpdatedPageLink()
{
global $h, $pd_router;
$pd = $pd_router->find_all();
$t = 0;
foreach ($pd as $i => $data) {
if ($data['last_edit'] > $t) {
$t = $data['last_edit'];
$n = $i;
}
}
return a($n, '') . $h[$n] . '</a>';
}
?>
Code: Select all
<p>Latest updated page: <?php echo latestUpdatedPageLink();?></p>
Christoph M. Becker – Plugins for CMSimple_XH
Re: Last edited txt <> link ?
thanks.......
i dont undrstand this
you can store the following as index.php of a new folder under plugins/:
i dont undrstand this
you can store the following as index.php of a new folder under plugins/:
Re: Last edited txt <> link ?
just put Christophs code into a file, name the file index.php, create a new folder with any name under the plugins folder and put your new index.php into that folder.twc wrote:you can store the following as index.php of a new folder under plugins/:
Re: Last edited txt <> link ?
uhm, dont working to badsvasti wrote:just put Christophs code into a file, name the file index.php, create a new folder with any name under the plugins folder and put your new index.php into that folder.twc wrote:you can store the following as index.php of a new folder under plugins/:
index.php > folder > latestUpdate > drop in main dir
template.htm
Code: Select all
<?php echo latestUpdatedPageLink();?>
Re: Last edited txt <> link ?
Hi twc,
I'm not sure if you have "installed" it correctly, so remove what you have and put the code into the file plugins/lastedited/index.php. It should work, even if I'm not sure, that it's the solution you were looking for.
Christoph
I'm not sure if you have "installed" it correctly, so remove what you have and put the code into the file plugins/lastedited/index.php. It should work, even if I'm not sure, that it's the solution you were looking for.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Last edited txt <> link ?
Cannot modify header information - headers already sent (output started at /mounted-storage/home121a/sub001/sc28987-VHAG/xxxxxxxx/xxxxxxxxxx/plugins/lastedited/index.php:1)cmb wrote:Hi twc,
I'm not sure if you have "installed" it correctly, so remove what you have and put the code into the file plugins/lastedited/index.php. It should work, even if I'm not sure, that it's the solution you were looking for.
Christoph
Re: Last edited txt <> link ?
I assume you have some characters before the starting <? or the file is encoded as UTF-8 with BOM.
Please try lastedited. Install as usual for plugins (i.e. in plugins/).
Please try lastedited. Install as usual for plugins (i.e. in plugins/).
Christoph M. Becker – Plugins for CMSimple_XH
Re: Last edited txt <> link ?
YOUR THE MANcmb wrote:I assume you have some characters before the starting <? or the file is encoded as UTF-8 with BOM.
Please try lastedited. Install as usual for plugins (i.e. in plugins/).
working great, i think thise must be @ next release +100000000000000
Re: SOLVED | Last edited txt <> link ?
I'm glad that it works and that it's what you were looking for.
I've put it on the roadmap: http://cmsimpleforum.com/viewtopic.php?f=29&t=5661
I've put it on the roadmap: http://cmsimpleforum.com/viewtopic.php?f=29&t=5661
Christoph M. Becker – Plugins for CMSimple_XH