Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 08:21:36 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155440 Posts in 21702 Topics by 7732 Members
Latest Member: Smacki
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Tags > Some way to do this better?  (Read 517 times)
bupaje

Offline Offline

Posts: 519


WWW
« on: September 10, 2008, 08:04:02 PM »

I want to add some search tags to some of my content - for example I have tutorials, link pages and downloads about Photoshop brushes and want to add a 'brushes' tag so users can click to see all results on the site. What I did for now was create a hidden tags/ page with hidden sub pages of type 'menulink' for each of the tags. These then redirect to a Search like so

Code:
http://www.stormvisions.com/search/index.php?string=brushes&search_path=-/help/,/workbench/,/posts/

and then I insert them in the top WYSIWYG of the pages manually like so

Code:
<p class="fast_tags">Search: <a href="[wblink282]">brushes</a></p>

You can see an example here just below the opening paragraph 'Search: brushes'
http://stormvisions.com/pages/freebies.php

I realize that as the site grows, and I add more tags, manually editing and updating each page I use this tags on will get tedious and error prone. I was wondering if there might be some way to use show_menu2, an SSI or some other code bit or snippet to be able to do this in a better way. Any suggestions? I'm just fishing for ideas here. I don't know php beyond tiny kludges using existing code, so I am looking for a simple solution.

Thanks.
Logged

My Blog, My Site
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #1 on: September 10, 2008, 08:36:46 PM »

User thorn has posted some "searchtools" including a tagcloud. Maybe have a look if that fits your needs or you can base your work upon it.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

thorn

Offline Offline

Posts: 980


WWW
« Reply #2 on: September 10, 2008, 09:18:34 PM »

Hello,

Searchtools-Module:
http://www.websitebaker2.org/forum/index.php/topic,10133.msg59499.html#msg59499
Unfortunately, there is no English documentation yet.

If you can use the keywords or description-field of each page for your tags (and only for your tags), you may use the appropriate tagcloud from this module.
See http://www.websitebaker2.org/forum/index.php/topic,10133.msg61804.html#msg61804
You need to make your own CSS for the tagcloud (no sizing, no aging, prettier appearance).
Each tagcloud-element becomes a link to the search-function, automatically.

If you want to give this a try, just
- install module (-> searchtools_0.54.55 .zip. You don't need searchtools_geoip_0 8.09.zip)
- enter some keywords (or descriptions) to your pages
- create a CODE-section
Code:
if(file_exists(WB_PATH.'/modules/searchtools/tagcloud/tagcloud.php')) {
  require_once(WB_PATH.'/modules/searchtools/tagcloud/tagcloud.php');
  $tags = fetch_tagcloud('linear', 99999, 0, 'st_module_keywords');
  display_tagcloud($tags, 'Search:');
}
use 'st_module_keywords' for keywords and 'st_module_descripti ons' for descriptions.

dispaly_tagcloud() will use WB_PATH.'/modules/searchtools/tagcloud/tagcloud.css' as CSS.
Just alter this file, or use your one
display_tagcloud($tags, 'Search:', '/var/local/path_to_your_own/style.css');


thorn.
Logged

bupaje

Offline Offline

Posts: 519


WWW
« Reply #3 on: September 10, 2008, 09:28:52 PM »

Wow, excellent! Thanks! I will give this a try tonight. Smiley

In the future maybe it would be worth adding a 'tags' or 'custom' field that users could use for stuff like this?  I know that Google throws up warnings in their Webmaster Tools section when different pages on a site have have identical keywords, titles or descriptions.
« Last Edit: September 10, 2008, 09:37:48 PM by bupaje » Logged

My Blog, My Site
thorn

Offline Offline

Posts: 980


WWW
« Reply #4 on: September 10, 2008, 10:05:59 PM »

Hello,

In the future maybe it would be worth adding a 'tags' or 'custom' field that users could use for stuff like this?  I know that Google throws up warnings in their Webmaster Tools section when different pages on a site have have identical keywords, titles or descriptions.

If you can add your one local field (e.g. adding field `tags` to table `pages` (SQL), and adding an extra field to page-settings (PHP,HTML)),
it would be very easy for me to add a kind of free-field-tagcloud, so one can use e.g.:
$tags = fetch_tagcloud('dist', 20, 0, 'st_free_'.TABLE_PREFIX.'pages.tags');, or
$tags = fetch_tagcloud('dist', 20, 0, 'st_free_'.TABLE_PREFIX.'mod_download_galler y_files.filenames.');, or
$tags = fetch_tagcloud('dist', 20, 0, 'st_free_'.TABLE_PREFIX.'mod_news_posts.tags');, ...

thorn.
Logged

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!