Difference between revisions of "My User Buttons Add-on"

From TNG_Wiki
Jump to navigation Jump to search
(Intitial Text)
(No difference)

Revision as of 03:15, 28 March 2017

Purpose of the Plugin

This add-on script makes basic navigation more user friendly and personalised for your users. It will produce a group of prominent buttons that provide your users with convenient links to your websites essential pages or their personal pages depending on the user’s current login/out status

  • Logged Out – links to the Login, Registration and Contact Us pages
  • Logged In – links to their personal Person Page, Family Chart and Vertical Ancestors Chart

Compatibility

  • This add-on is most suitable with TNG 11
  • It can be used with TNG 10 providing the Family Chart Mod has been installed
  • For TNG versions previous to these, it is recommended that you upgrade

Otherwise the buttons can be repurposed and/or removed as you wish.

Alternatives

You may like to also consider the Open My Page mod by Erik Hoppe.

Installation

There are 2 files associated with this Plug In –

  • The CSS coding that control how the buttons look
  • The PHP coding that control how the buttons function

To install and use this TNG Add-on, you need to copy this coding to files within your server.

Custom Configuration

The CSS styling provided has been styled on Template 8 therefore you may choose to edit the colour, size and/or shape of the buttons to suit your template styling or replace the button style all together.

The PHP coding is coded to the functions as per the description section above however, you may choose to reformat, repurpose, remove or add more buttons to suit your needs.

The PHP text coding is not variable (language switching) but you can recode these to variable text if you wish and add the relevant variables to your language files as necessary.

If you come up with alternate uses for the buttons that you think would be of interest of other users, please post them in the “Alternate Button PHP functions” section below along with your details.

Considerations

With the My Ancestors button pointing to the vertical chart, you may like to set initial number of ancestor generations to maximum to give your users a full(er) initial view of their ancestry.

If you decide to do this, it would also pay to set the vertical chart as your default ancestor chart otherwise your users may have to wait an eternity for the other ancestor charts to load when clicking on the ancestor tabs if it isn’t the default.

You may also like to install the Verticalchart Photos mod which adds photos to these charts.

You may choose to remove the standard Login, Registration and Contact Us links from your PHP pages to reduce clutter.

Authors

This plugin was inspired by and much of the script is based on the My Page Mod by Erik Hoppe. The script has been further developed and the css buttons styled by Merv Priestley.

The Script

The CSS

The CSS coding can go into your template/css/mytemplatestlye.css file

(Add CSS Coding)

The PHP

The PHP coding will go into a PHP page - most typically a suitable section within your your template index.php file (Home Page), but can incorporated into any PHP page you determine helpful to your users. For TNG 10, you will need to add the Family Chart Mod to your site and then change the Personalised Family Chart link script from"familychart.php?personID=" to "family.php?personID=" For versions, previous to TNG 10, it is recommended that you upgrade.

(Add PHP Coding)

Visualisation

Alternate Button PHP functions

Persistent Log In/Out PHP with text variable coding (language switching)

By Merv Priestley

(Add PHP Coding)

Visualisation

Persistent Contact Us button PHP that replaces the Contact Us section title

By Merv Priestley

(Add PHP Coding)

Visualisation