Gossamer Forum
Home : Gossamer Threads Inc. : Announcements :

Gossamer Links 3.0.0 Beta 1

Quote Reply
Gossamer Links 3.0.0 Beta 1
Hi,

We're pleased to announce the release of the Gossamer Links 2.99.0 - the first beta of Links SQL 3.0.0 (beta 2, if required, will be 2.99.1, and so on). We should point out that this is not an officially supported release - we encourage people to test and try out this release, offering any feedback, but do not recommend it for production use.

Specifically, we're looking for testing of templates, plugins, that sort of thing. Your old v2 templates should still work with the new Gossamer Links version, and plugins should still work properly in nearly every case.

This is a beta release - we want to get feedback, show off the new look, but production sites should wait until the final 3.0.0 release before upgrading.

New Features:
  • New Template Set
    • The new luna template set is XHTML 1.0 Transitional compliant and extensively uses CSS.
    • All the HTML generation in the code has been changed to be done in the templates, allowing for maximum flexibility.
    • With the style removed from the HTML, it should allow for much easier template upgrades.
  • Gossamer Update
    • An automatic update system that downloads updated files from our server, auto-detects current version and updates only the files that need to be updated. You'll never have to run install.cgi again for an update, and never have to upload files manually for posted Official Bug Fixes.
  • Bookmarks
    • Allow users to bookmark links from the directory and to share bookmark collections publicly, or store them in private folders.
  • Advanced Newsletter
    • Users may now subscribe to selected subcategories, rather than simply the entire directory.
  • Category directory naming
    • Now fully configurable, including the ability to limit long category names, better optimised for search engines.
  • Detailed Page naming
    • Naming and location of detailed page is now also configurable, including optional support for putting detailed pages inside their respective category directories.
  • Search Logger
    • Log searches made, the number of results and the average time the search took.
  • Search Highlighting
    • Highlight search terms contained in the search results.
    • This option replaces the search_bold option.
  • Framed Redirects
    • New option allowing links to be loaded in a frame so the user can easily go back to the Gossamer Links installation or perform actions on the link (review, bookmark, etc).
  • Link Validation
    • New option to check that links' URL are valid before allowing them to be submitted.
  • View Reviews by ID
    • By passing ReviewID into review.cgi, you may now view individual reviews.
  • Added static url
    • This gives Gossamer Links a proper location to put javascript and css files.
  • Improved support for adding links into multiple categories
    • By changing the html select element to allow multiple selections, you can easily allow users to select multiple categories to add their links to.
    • The templates and e-mail templates have been updated to handle the multiple templates properly.
    • Note that payments still do not support multiple categories.
  • New paging code
    • The new paging code allows you to easily change the look and feel of the paging toolbar.
    • There are 3 different styles to choose from, and the code can easily be overridden to generate your own paging toolbars.

Bug Fixes:

  • Jump code was incorrectly using REMOTE_HOST instead of REMOTE_ADDR for hits logging.
  • Expiry notify was sending notices for links awaiting payment.
  • Only the owner of a link may now make payments towards a link.
  • Fixed various small payment bugs.
  • When a link is validated, the add/mod dates are now set to the current date.
  • Fix fatal error when users are deleted before queued mass emails are sent.

Miscellaneous:

  • Other than the exception below, the Links SQL 2.x templates and plugins should still be compatible with Gossamer Links 3.x.
  • If you are still using Links SQL 2.x templates, then one change in Gossamer Links 3.x that breaks compatibility is in the review_search_results.html template. You must change the <%user%> tag to <%username%>.
  • The PHP front-end is no longer supported due to miniscule usage by client base.

Template Notes:

There have been many changes in the design and usability with the creation of the luna template. Here is a list of some things that have been added:
  • 'isPaidLink' has been added to available tags when looping through links. This tag is set if the current link is a paid link (as opposed to a free one).
  • The 't' tag has been added to always exist as the current template set.
  • in, config, user hashes have been added
    • 'in' is now available as the GT::CGI input parameter, allowing for usage such as: <%in.test%> to access $IN->param('test'). Those programs that currently pass through all input parameters as normal template variables will continue to do so for now, but may be removed in favour of in.paramname at some point in the future.
    • likewise, 'config' is now available to access the programs' $CFG object. For example, <%config.admin_root_path%> would access $CFG->{admin_root_path}.
    • lastly, 'user' contains the currently logged in user.

GT::Template Changes:
  • The GT::Template syntax help is now found in the GT::Template::Tutorial documentation - the GT::Template documentation now only includes information on invoking GT::Template
  • 'set' directives may now contain an operator on the right hand side, for example: <%set foo = $bar * 3%>, <%set foo += $bar * 3%>
  • New '||=' (or-equals) and '&&=' (and-equals) set directives available. Old: <%ifnot foo%><%set foo = 3%><%endif%> New: <%set foo ||= 3%>
  • Template includes may now include files based on template variables: <%include $variable%>
  • Individual hash/array reference values may be accessed using "a.b" notation:
    • <%var1.foo%> accesses tags->{var1}->{foo}
    • <%var2.3%> accesses tags->{var2}->[3]
    • <%var2.length%> is a special tag that returns the number of elements in the 'var2' array reference
  • Filters (such as escape_html, nbsp, uc, etc.) may now be nested, such as: <%nbsp unescape_html variable%>
  • Filters may be used within 'set' statements: <%set var2 = nbsp unescape_html var1%>
  • Whitespace to the left and/or right of tags can be removed by starting and/or ending the tag with a '~', such as: <%~foo~%> which would display the 'foo' variable but not display any spacing before and after the tag.
  • GT::Template provides a new, much improved way of accessing tags from plugins, globals, etc. You may now call GT::Template->vars to access a GT::Template::Vars object that gives you a transparent way of accessing and retrieving template tag values.
    • my $vars = GT::Template->vars; gives you a new object.
    • $vars->{abc} accesses the 'abc' tag. Unlike the hash reference returned by GT::Template->tags, this will alway be a string, and any HTML-escaping that would apply (or not apply) inside the template will apply to the value retrieved. No more worrying about a value retrieved being a scalar reference, or being escape or not escaped.
    • $vars->{abc} = "value"; sets a value. HTML-escaping will apply if the tag is accessed again - either inside a template or by retrieving the value of $vars->{abc}. If the value is already HTML-escaped, or should not be escaped, set the variable to a reference: $vars->{abc} = \"value";
    • $vars->{"abc.def"} accesses the same value it would in a template - that is, it accesses the "def" key of the "abc" hash reference. Likewise for $vars->{"def.length"}, which would return the length of the "def" array reference/loop.
    • GT::Template->vars is now recommended instead of GT::Template->tags in all cases. GT::Template->tags still works as it did before.
    • See the GT::Template::Vars documentation included with Gossamer Links.
  • To assist in template debugging, a new <%DUMP%> tag has been added. This is essentially the same as the old GT::Template::dump, except that it can take a variable as an argument. When a variable is passed in, DUMP will attempt to dump the variable's structure. Without any arguments, DUMP will perform a full template variable dump.

Developer Notes:
There have been some internal changes in Gossamer Links that any plugin developers should be aware of. They are listed below:
  • Categories have been modified to use GT::SQL::Tree. This brings various speedups to Gossamer Links in areas related to category manipulation. For advanced uses, the tree can be used by obtaining a GT::SQL::Tree object - see the documentation for that module for more details. An example of the tree usage can be found in the added Newsletter code.
  • $GT::SQL::PREFIX should not be used, as it is not guaranteed to be correct in all cases. Instead you should use $DB->prefix() to determine the table prefix.
  • A few helper functions have been added to Links.pm:
    • Links::send_email makes sending emails in plugins easier.
    • Links::limit_offset simplifies proper checking of mh and nh.
    • Links::template_set returns the current template set.


Gossamer Threads Development Team

Last edited by:

GT Dev Team: Mar 14, 2005, 12:31 AM
Quote Reply
Re: [GT Dev Team] Gossamer Links 3.0.0 Beta 1 In reply to
We've updated the above post with the Gossamer Links 3.0 beta 1 changelog.

Gossamer Threads Development Team