Loading...
 
A Virtual Front Porch (wiki) to discuss an internal project of the VFP to use Tiki trackers for external links. Add this code to your tiki site...
Location : Virtual Front Porch » Project: External Links Using A Tracker

This is an internal Virtual Front Porch project.

  • Feel free to use this info to add something similar to your Tiki site...

The need

Tiki is phasing out the Directory

  • Not sure how to link to the Directory on this site...
    • scroll down the left side and you will see a Directory link under Menu.

Most pages here would be enhanced by having at least a few external links, so users can keep researching.

  • It also is an easier way for users to add links to any page.
    • Easier than editing the page.
      • And safer, since novice editors wouldn't accidentally "mess up" the current page trying to directly edit in the code for the links..

Possible solutions

We could try to customize and integrate the current directory coding into modules and such.

  • Quite a steep learning curve to just figuring out what files do what in Tiki.

We could try using trackers.

  • Quite a steep learning curve to figuring out Trackers, but quicker than the 1st option.

Things learned

After the site crashed, I set up this tracker again.

  • I found an advanced setting for the url.
    • It can magically link to the name of the page.
      • You don't need a tracker field for external page name.
  • BUT all links started showing on admin type pages.
    • so I went back to filterfield="86" exactvalue="{{ page }}"


You will need to set permissions for Trackers.

  • tiki-objectpermissions.php
    • Specifically if you want Anonymous to be able to view or add Trackers
    • Look for
      • Can view trackers (tiki_p_view_trackers)
      • Can create new tracker items (tiki_p_create_tracker_items)
    • This sets the global permissions for trackers.
      • You can override global permissions for specific trackers if you have some you do not want Anonymous to access.

jabis

jabi = Just Another Bright Idea = pronounced jab eye

  • a page can be created for specific links
    • Example Tiki Sites Directory
    • I like the idea of having a seperate page.
      • These can then be structured to create a Directory in the Wiki.
  • When looking to do something,
  • This would take some major programming, but...
    • Wouldn't it be cool if all off site links on all wiki pages, blogs, etc. used the directory part of the program?
      • Automatically add the link to a directory
    • Track how many times a link has been clicked.
      • Allowing that info to be used in the ratings.
  • The problem with the current instance of Tiki Features - Directory
    • Is that it is not integrated into the wiki.
      • It is way to hard for a normal user to use the Directory then put those links into the Wiki page.
  • First you have to create a wiki page
    • Then, if you want to link a page through the directory,
      • You have to add the link to the directory
      • Then use convoluted link code to the directory using an ID from there into the wiki page you are creating.

alpha 0.1d

After reading some more from https://doc.tiki.org/PluginTrackerList
here's my current code...
NOTE: Anytime you see {{ page }}, remove the spaces.

  • Tiki puts in this pages name if I don't do it that way.
{ANAME()}addalink{ANAME}
Links to external web sites related to this page: {{ page }}
{trackerlist trackerId="9" fields="81:83:86" filterfield="86" exactvalue="{{ page }}" server="n" tspaginate="max:10;expand:20;expand:30;expand:40;expand:50" list_mode="y" sortable="type:reset" tsfilters="type:text;placeholder:Type to filter...|type:text;placeholder:Type to filter...|type:text;placeholder:Type to filter..."}


!!!-Click + sign for 'Add a Link' form

{TRACKER(trackerId="9" fields="81:82:83:86" action="Add Link")}Thanks!!! Your Link was added!%%%{trackerprefill page="{{ page }}" label="Add another link" field1="86" value1="{{ page }}"}{TRACKER}

!!!Would you like to add this to your Tiki site?
((Project: External Links Using A Tracker))

alpha 0.1 "Proof of concept" code

In just a few hours of research and coding, I was able to create a usable platform using a Tracker.

Here's what I have so far.

I created a Tracker (Tracker ID = 9) called "External Links" with the following fields:

Field #Name of FieldType of FieldPermanent Name
81urlurlurl
82Page NameText FieldpageName
83Page DescriptionText AreapageDescription
84Link Doesn't WorkCheck boxlinkDoesnTWork
86Show On PageWiki PageshowOnPage


I then created a Custom Module Titled Off site Links
Here's the code...

Links to external web sites related to this page:

{trackerlist trackerId="9" fields="73:74:75:76" filterfield="77" exactvalue="{{ page }}"  editable="76" showpagination="y" tspaginate="max:10" list_mode="y"}

!!!-Click + sign for 'Add a Link' form)

{TRACKER(trackerId="9" fields="73:74:75:77" action="Add Link")}Thanks!!! Your Link was added!{TRACKER}

!!!!Would you like to add this to your Tiki site?
((Project: External Links Using A Tracker))


Voila, it showed up on all 5500+ pages of the Virtual Front Porch.
Cool!

You can use this info to add this to your tiki site.

  • Update with your info
    • when you create your tracker, you will need to update the trackerid .
    • when you create your fields, you will need to update the field ids.

If you fix any bugs or update, please let me know what you've done.

  • Add a comment to this page, with a link...


Known bugs, etc.

  • You can only enter one site, then have to reload the page to enter another.
  • Will need a way to admin: edit, delete, etc.
  • Would like to automatically insert Page Name into the form. I know I read about doing that on one of the doc pages here, but cannot find it again...
  • I included a check box for 'Link is bad' in the tracker, but can't yet check it.
  • Pagination is not working on the TrackerList
  • No categories, sub-categories, yet. Will likely add this so all External Links can be used to create a "Directory"...
  • I added a link on this page to the forum discussion on tiki.org about the Directory.
    • It does not show up here. I can see it under trackers..
      • I wonder if it's because of the : in the page name?

Successful Testing

You must be registered to add a link.

  • this should help eliminate spam in the links directory.


See Also

The Virtual Front Porch

YOUR very own WWW Virtual Front Porch

Contributors to this page: WizarDave .
Page last modified on Saturday August 13, 2016 09:41:36 CDT by WizarDave.

Categorize Project: External Links Using A Tracker