Viewing 6 posts - 1 through 6 (of 6 total)
Author
Posts
  • #4245

    Hello all,

    I have a couple of questions about simple pages:

    1. I succeeded in producing some Simpl_pages, which work fine when I’m logged in. However, if I logout, the menu for the Simpl_pages disappears. I did select “Show to visitors” for the access level.
    2. Is it possible to generate several sets of Simpl_pages, with different menu items for each one?

    Thanks in advance for any help.

    James

  • #4246

    Since Nigel hasn’t responded yet, I will put my two cents worth in.

    1. There are two access levels for the siml_pages that need to set. First is on the administration/ modules/menus page. The other is on the simpl_pages page editor near the bottom of the work area.

    2. Because of the above there is flexibility in building different pages for different user access groups. I have one set up where visitors see two pages but members see five additional ones. I seem to remember that more than one instance of the simpl_pages modules are possible but I have never needed it because I was able to accomplish what needed to be done by using the two access settings.

    Roy

    Apache 2.4.27  PHP 7.19 MariaDB 10.2.8

  • #4247

    Thanks Roy. I was bit late getting out of bed this morning 🙂

    Answer 1. – spot on.
    James, I suspect you have not set the menu controls (Administration > Modules > Menus)

    Re. multiple implementations of pages, yes absolutely possible. Just a tiny piece of programming required. You can see examples on my personal site (link below). The menu items Resources, WWII Memories, and Web links are three copies of the same module. If you look at their URLs you will see ‘simple_pages’, simple_pages_1, and simpl_pages_2, though there’s nothing special about the numbering. That’s just my personal choice. They can be called anything as long as they are different. Here’s how to do it:

    1. Copy the module ‘simple_pages in the kiwitrees/modules_v3/ folder so you have a duplicate
    2. Rename it as something else
    3. In that new folder, open the file module.php look at line 30. It should start with “class simpl_pages_WT_Module”. Change the “simple_pages” part to exactly whatever you named your duplicate folder as. For example, in my case it became “class simpl_pages_1_WT_Module”
    4. While there, you can optionally change line text inside lines 38 [the module title] and line 43 [the module description]. I find this makes identifying multiple versions easier in the admin modules list.

    A couple of points to watch for:

    1. Use a decent text editor for the changes. Some, like MS Notepad can introduce hidden characters [byte order marks or BOM] that prevent the page from displaying. My personal preference is SublimeText. Notepad++ is also very good. Both are available as free downloads.
    2. Remember that at the next upgrade will not upgrade your copy module. So you will need to re-copy the new standard version, repeating the above steps. I advise you ALWAYS do this, as I cannot guarantee to notify users of every minor change to every module you might have customised.
    Nigel
    My personal kiwitrees site is www.our-families.info
  • #4248

    Thanks a lot to Roy and Nigel for your replies. I’d looked for options on the ‘Privacy’ and ‘Hide & Show’ tabs of the ‘Family Trees’ management page but I didn’t think of looking at Modules -> Menus. Works fine now.

    Thanks also to Nigel for the explanation of how to create multiple Simpl_pages, which seems fairly straightforward, and quite flexible. I use Xemacs on Mac for my text editor, and living in France I’ve got used to dealing with problems of accents! There are always files and folders which need to be copied when upgrading (the data folder for example), so I’ll try to remember to include the copies of the Simpl_pages folders.

    Thanks again for your help.

    James

  • #4249

    Just in case anyone else tries multiple instances of simpl_pages, I also discovered that once the changes have been made, one needs to check Simpl_pages_1 in the Modules -> Manage modules menu, otherwise the second instance of Simpl_pages doesn’t appear in the menu bar. Also, I found that it’s necessary to change all instances of simpl_pages to simpl_pages_1 (for instance) in module.php in the new folder simpl_Pages_1, otherwise the editor gets confused about which instance is being edited.

  • #4250

    Also, I found that it’s necessary to change all instances of simpl_pages to simpl_pages_1 [for instance] in module.php in the new folder simpl_Pages_1, otherwise the editor gets confused about which instance is being edited.

    Thanks for that reminder. In fact it really serves to highlight the point I made:

    … I cannot guarantee to notify users of every minor change to every module you might have customised.

    I say that because sometime ago (but after the release of the current kiwitrees 3.0.0) I amended the code so there are now NO other references to “simpl_pages” other than the first one in line (now) 30. The others are now reference’s back to whatever you set that one (and the folder name) to be. I forgot in my instructions to you that I had made the change, but that you woulld not have that version. It will be in the next release, which is not far away now.

    Nigel
    My personal kiwitrees site is www.our-families.info
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Questions about Simpl_pages’ is closed to new replies.