Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
Last Modified information
Information that shows in the bottom right corner of sidebar template.
Avatar
Mikeski47 #1
Member since Nov 2013 · 13 posts
Group memberships: Members
Show profile · Link to this post
Subject: Last Modified information
This appears in the bottom right corner of the page: start.txt · Last modified: m/d/Y H:i (external edit). This should have the date and who last modified this page. I cannot get this to work. I have an older version of sidebar and want to update to a new version but in the new version this is not working. I am pretty new to Dokuwiki and would appreciate any help. Thank you.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4690 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
What steps have you so far taken in your upgrade?
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Mikeski47 #3
Member since Nov 2013 · 13 posts
Group memberships: Members
Show profile · Link to this post
Actually I have setup a whole new dokuwiki with the most recent version of dokuwiki sidebar. I then copied the necessary folders to the new version on a different computer. The only thing I have yet to get working is this "last modified" piece that appears in the lower right of the page. In the old version the code was in inc/template.php. I have found some similar code in the new version but instead of "print" it has a variable $out. Below is the old and new colde.

OLD CODE

  $fn = utf8_decodeFN($fn);
  $date = strftime($conf['dformat'],$INFO['lastmod']);

  // print it
  if($INFO['exists']){
    print $fn;
    print ' · ';
    print $lang['lastmod'];
    print ': ';
    print $date;
    if($INFO['editor']){
      print ' '.$lang['by'].' ';
      print $INFO['editor'];
    }else{
      print ' ('.$lang['external_edit'].')';
    }
    if($INFO['locked']){
      print ' · ';
      print $lang['lockedby'];
      print ': ';
      print $INFO['locked'];
    }
    return true;
  }
  return false;
}

NEW CODE

    $fn   = utf8_decodeFN($fn);
    $date = strftime($conf['dformat'],$INFO['lastmod']);

    // print it
    if($INFO['exists']) {
        $out = '';
        $out .= '<bdi>'.$fn.'</bdi>';
        $out .= ' · ';
        $out .= $lang['lastmod'];
        $out .= ' ';
        $out .= $date;
        if($INFO['editor']) {
            $out .= ' '.$lang['by'].' ';
            $out .= '<bdi>'.editorinfo($INFO['editor']).'</bdi>';
        } else {
            $out .= ' ('.$lang['external_edit'].')';
        }
        if($INFO['locked']) {
            $out .= ' · ';
            $out .= $lang['lockedby'];
            $out .= ' ';
            $out .= '<bdi>'.editorinfo($INFO['locked']).'</bdi>';
        }
        if($ret) {
            return $out;
        } else {
            echo $out;
            return true;
        }
    }
    return false;
}

Again, any help you can provide to help me get this to work will be appreciated. Thank you.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4690 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
There's no need to go into the code.  If you have the current dokuwiki with the current template, this is all done for you.  Perhaps your template is out of date.  Check for an update.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
dregad #5
Member since Nov 2015 · 3 posts
Group memberships: Members
Show profile · Link to this post
@Mikeski47 I think you are (or were) facing the same problem as I had - in case it is still an issue for you, you may want to have a look at https://forum.dokuwiki.org/post/61407.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-23, 15:32:54 (UTC +02:00)