TagCloud for phpwcms [Update v2.3.1]
Re: TagCloud for phpwcms v0.5a (works with UTF and ISO latin)!
Hi marcus,
seems you are always in a hurry. Pilots would call this "touch and go". I'm sure that you are a PHP pro, aren't you? So thank you very much for dropping in and comment on this!
Well, no, this function already was mentioned within that really very old releases before but was not working as desired [don't know why!?].
Anyway, one of the most relevant improvements was to change the way how to strip off/cut out HTML code, Java Script, (unsecure) PHP code and particularly other common {PHPWCMS}-tags.
When following your proposal, I had a look at the phpwcms search and other files again but this time found a variety of useful functions there. For the actual version I could rely on these built in (loaded, available) functions[*]. The results seem to be [very] clean code [also] on which all the analytic stuff can be applied to.
Statistically all evaluations[*] on my test server [one web site set up with utf-8 and another with iso latin] prove that Tag Cloud for phpwcms not only promises but does exactly what it was built for: to deliver reliable, valid results...
[*]RUNNING FASTER !!?!!
Think about SPEED:
Usually only one!! {the actual} PAGE (article with other FERScripts assigned) will be rendered [on server request] and sent to the [client{s}] browser. TagCloud for phpwcms [subsequently by request] has to read/analyse all! PAGEs (articles) [--> DB] content [as defined!] --> additionally - ON THE FLY.
BTW: That's why I'm interested in how [acceptable fast] TagCloud is running on sites with many [>10] categories and/or more than >10 articles per category...
Hey fellows, ARE there any experiences regarding speed???
seems you are always in a hurry. Pilots would call this "touch and go". I'm sure that you are a PHP pro, aren't you? So thank you very much for dropping in and comment on this!
Well, no, this function already was mentioned within that really very old releases before but was not working as desired [don't know why!?].
Anyway, one of the most relevant improvements was to change the way how to strip off/cut out HTML code, Java Script, (unsecure) PHP code and particularly other common {PHPWCMS}-tags.
When following your proposal, I had a look at the phpwcms search and other files again but this time found a variety of useful functions there. For the actual version I could rely on these built in (loaded, available) functions[*]. The results seem to be [very] clean code [also] on which all the analytic stuff can be applied to.
Statistically all evaluations[*] on my test server [one web site set up with utf-8 and another with iso latin] prove that Tag Cloud for phpwcms not only promises but does exactly what it was built for: to deliver reliable, valid results...
[*]RUNNING FASTER !!?!!
Think about SPEED:
Usually only one!! {the actual} PAGE (article with other FERScripts assigned) will be rendered [on server request] and sent to the [client{s}] browser. TagCloud for phpwcms [subsequently by request] has to read/analyse all! PAGEs (articles) [--> DB] content [as defined!] --> additionally - ON THE FLY.
BTW: That's why I'm interested in how [acceptable fast] TagCloud is running on sites with many [>10] categories and/or more than >10 articles per category...
Hey fellows, ARE there any experiences regarding speed???
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
Re: TagCloud for phpwcms v0.5a (works with UTF and ISO latin)!
hi, oh well I'm not really a php pro - I never studied php or programming, but there was a need and interest to learn it and to take closer look on existing scripts.
phpwcms programming code is very easy to understand - because it's very linear written i would say.
In my first tests, the speed depends on used values in $min. but at all - it works fast enought I think.
greetings
marcus
PS if I have enought time to play with, I will tell you my experience.
phpwcms programming code is very easy to understand - because it's very linear written i would say.
In my first tests, the speed depends on used values in $min. but at all - it works fast enought I think.
greetings
marcus
PS if I have enought time to play with, I will tell you my experience.
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
Re: TagCloud for phpwcms v0.5a (works with UTF and ISO latin)!
hi,
i've found this function inside phpwcms optimizeForSearch();
just place it here:
it should do most of tag stripping etc. ?!
(I'm not shure about backwardscompatibility)
greetings marcus
i've found this function inside phpwcms optimizeForSearch();
just place it here:
Code: Select all
/*****************************************************************
and do some convertions
*****************************************************************/
optimizeForSearch();
...
(I'm not shure about backwardscompatibility)
greetings marcus
Re: TagCloud for phpwcms v0.5a (works with UTF and ISO latin)!
Yes it does, but it is made for working on the submitted search words! Thus and because it is 'optimize[d]ForSearch' it strips off not only tags and that stuff but almost ALL double expressions (but needed here). So, this function works similar to what we could need but --> right in the opposite direction (somehow). When using this function you'll get no valid results!marcus@localhorst wrote:...just place it here:it should do most of tag stripping etc. ?!...Code: Select all
/***************************************************************** and do some convertions *****************************************************************/ optimizeForSearch(); ...
These work well in preparation on counting, deletion, excluding, decode_entities...
Code: Select all
clean_replacement_tags($tagtext);
remove_unsecure_rptags($tagtext);
stripped_cache_content($tagtext);
[EDIT]I guess it needs no: remove_unsecure_rptags(); because (debug, seems) they already are eliminated by clean_replacement_tags();[/EDIT]
Re: TagCloud for phpwcms v0.5a (works with UTF and ISO latin)!
your friend is:
but if there is no input ...
Code: Select all
remove_unsecure_rptags(clean_slweg($dings));
Re: TagCloud for phpwcms v0.5a (works with UTF and ISO latin)!
Hi Jürgen,
thank you!
This function does a good job, as well, but does not strip off {PHPWCMS} tags. So, the best base to apply math. analytics to [as far I can see] I got using:
[x]
Result is plain text just separated by space ' '
I'm glad v0.5a already delivers valid results. Some limitations: guest book entries, recipes and image caption aren't mapped. Need to understand SQL LEFT JOIN....
thank you!
This function does a good job, as well, but does not strip off {PHPWCMS} tags. So, the best base to apply math. analytics to [as far I can see] I got using:
[x]
Result is plain text just separated by space ' '
I'm glad v0.5a already delivers valid results. Some limitations: guest book entries, recipes and image caption aren't mapped. Need to understand SQL LEFT JOIN....
Last edited by Jensensen on Fri 19. Sep 2008, 20:18, edited 1 time in total.
TagCloud for phpwcms v0.6a
Hi folks,
new --> fastest version 0.6a of TagCloud for phpwcms is available today!
This version contains some minor improvements and ONE MAJOR:
A, one, --> the first page request now will be --> cached by MySQL!
By this, --> TagCloud will be ready to be included on your pages without need to be newly rendered/rebuilt! This speeds up page rendering:
run phpMyAdmin and
--> check your database if there is caching available:
--> check your database HOW BIG the cache was set
and/or change MySQL CACHE SIZE by your need:
http://dev.mysql.com/doc/refman/5.0/en/ ... ation.html
Download latest fastest v.06a and have fun:
new --> fastest version 0.6a of TagCloud for phpwcms is available today!
This version contains some minor improvements and ONE MAJOR:
A, one, --> the first page request now will be --> cached by MySQL!
By this, --> TagCloud will be ready to be included on your pages without need to be newly rendered/rebuilt! This speeds up page rendering:
Works well with MySQL 4.1 and newer and [by --> DEFAULT] in MOST CASE NEEDS NO CHANGES...but you can...Searches for a single row in a single-row table are 238% faster with the query cache than without it.
run phpMyAdmin and
--> check your database if there is caching available:
Code: Select all
SHOW VARIABLES LIKE 'have_query_cache';
Code: Select all
SHOW VARIABLES LIKE 'query_cache_size';
http://dev.mysql.com/doc/refman/5.0/en/ ... ation.html
Download latest fastest v.06a and have fun:
TagCloud for phpwcms [v1.0]
Hi webmasters, site owners, folks and friends - this is for you: TagCloud v1.0 for phpwcms starts today!
[Thanks to marcus@localhorst who made the missing tunes and
thanks to DF6IH for inspiration]
Ever thought: "Well, nice tool but I have really many [too much] categories to type into the RT {TAGCLOUD...} by hand - simply annoying, irritating?!?! --> Why not vice versa!?"
That's why TagCloud for phpwcms was optimized for, once again!
Now {with v1.0} it's much easier than ever to run/place your tag cloud [clouds!] anywhere on your pages --> with minimal effort.
For example, webmasters, admins or site owners do not need to add/type all site structure level [category] id's to the replacement tag for matching all articles which resides in there. You now can do it vice versa --> JUST choose --> render mode I or E!
Hmm, Render Mode? What's this?
EXAMPLE: render mode I --> include (articles in) categories
Let's say you want to have/place a tag cloud based on all articles(' content) in category (site structure level) with category-ID: 0,1,7,8,9,12,18,35,49,52,63,78,88,112,124,152,154,168,169,170,171,172,173,174,225,226,801,802,911.
For this you could use RT:
{TAGCLOUD:I:0,1,7,8,9,12,18,35,49,52,63,78,88,112,124,152,154,168,169,170,172,173,174,225,226,801,802,911:S:40}
Render mode: I ==> includes all articles in category 0,1,7,8,9,12,18,35,49,52,63,78,88,112,124,152,154,168,169,170,172,173,174,225,226,801,802,911 and
Tag Cloud Links will link to -> S = phpwcms [your] search page which {article} ID is 40
Now let's do it vice versa.
Think about you're running a really huge web site with many categories and with many articles. Then checking, typing the relevant cat-IDs can be annoying... but now render mode 'E' does the job for you:
EXAMPLE: render mode E --> exclude (articles in) categories
In this case just remember those category-ID's in which the articles are [in] you DO NOT WANT to be matched to the 'cloud'. Therefor you can now use
Render mode: E ==> exclude (articles in) category ID x,y,z. The RT replacement tag might looks like:
{TAGCLOUD:E:2,6,162:L:57}
This means ANY content of ANY articles within ANY CATEGORY OF YOUR WEB SITE will be analyzed BUT NOT THOSE articles which are in --> this [exclude 2,6,162] category you've added to the RT! and the Tag Cloud Links will link to -> L = your Landing page which {article} ID is 57
more EXAMPLEs:
I --> include categories
{TAGCLOUD:I:0,1,3,12........:L:127}
127 = Article ID of "Landing page"
0,1,3,12... ==> IDs of Site structure levels / categories in all the articles reside you want to match/analyse the cloud.
E --> exclude categories
{TAGCLOUD:E:5,18,24,124........:S:314}
314 = Article ID of "SEARCH page"
5,18,24,124... ==> IDs of Site structure levels / categories in all the articles reside you DO NOT want to be matched/analyzed the cloud of.
Conclusion/Summary: TAGCLOUD RT
in brief and for example:
{TAGCLOUD:E:2,6,162:S:57} or
{TAGCLOUD:I:1,5,16,18:L:128}
TagCloud for phpwcms works fine, reliable, stable and [--> because of SQL_CACHE] --> runs very fast! When you are a WebAdmin just run TagCloud once for testing/preview and then --> your site visitors [Boom, Bang!] will have the cloud already rendered and saved [read/fetched from --> MySQL_CACHE] during [msec] milliseconds. [as long as content wasn't changed -- but, anyway, after the new, changed content was called {again just} once, the subsequent visitors {Boom, Bang!} will have the {cached again new} cloud...displayed on the page.]
PLEASE NOTICE: (RTFM := read the fckn manual inside code)
still [only] your content of --> blogs, recipes will be ignored [agreeable? otherwise -->]
ANY improvements, suggestions, experience appreciated!!!
ANY questions? --> VSeeme ID: jens or post to this thread...
Happy Easter 2008!
################################# download newest v.1.1
http://forum.phpwcms.org/viewtopic.php?p=101848#p101848
####################################################
[Thanks to marcus@localhorst who made the missing tunes and
thanks to DF6IH for inspiration]
Ever thought: "Well, nice tool but I have really many [too much] categories to type into the RT {TAGCLOUD...} by hand - simply annoying, irritating?!?! --> Why not vice versa!?"
That's why TagCloud for phpwcms was optimized for, once again!
Now {with v1.0} it's much easier than ever to run/place your tag cloud [clouds!] anywhere on your pages --> with minimal effort.
For example, webmasters, admins or site owners do not need to add/type all site structure level [category] id's to the replacement tag for matching all articles which resides in there. You now can do it vice versa --> JUST choose --> render mode I or E!
Hmm, Render Mode? What's this?
EXAMPLE: render mode I --> include (articles in) categories
Let's say you want to have/place a tag cloud based on all articles(' content) in category (site structure level) with category-ID: 0,1,7,8,9,12,18,35,49,52,63,78,88,112,124,152,154,168,169,170,171,172,173,174,225,226,801,802,911.
For this you could use RT:
{TAGCLOUD:I:0,1,7,8,9,12,18,35,49,52,63,78,88,112,124,152,154,168,169,170,172,173,174,225,226,801,802,911:S:40}
Render mode: I ==> includes all articles in category 0,1,7,8,9,12,18,35,49,52,63,78,88,112,124,152,154,168,169,170,172,173,174,225,226,801,802,911 and
Tag Cloud Links will link to -> S = phpwcms [your] search page which {article} ID is 40
Now let's do it vice versa.
Think about you're running a really huge web site with many categories and with many articles. Then checking, typing the relevant cat-IDs can be annoying... but now render mode 'E' does the job for you:
EXAMPLE: render mode E --> exclude (articles in) categories
In this case just remember those category-ID's in which the articles are [in] you DO NOT WANT to be matched to the 'cloud'. Therefor you can now use
Render mode: E ==> exclude (articles in) category ID x,y,z. The RT replacement tag might looks like:
{TAGCLOUD:E:2,6,162:L:57}
This means ANY content of ANY articles within ANY CATEGORY OF YOUR WEB SITE will be analyzed BUT NOT THOSE articles which are in --> this [exclude 2,6,162] category you've added to the RT! and the Tag Cloud Links will link to -> L = your Landing page which {article} ID is 57
more EXAMPLEs:
I --> include categories
{TAGCLOUD:I:0,1,3,12........:L:127}
127 = Article ID of "Landing page"
0,1,3,12... ==> IDs of Site structure levels / categories in all the articles reside you want to match/analyse the cloud.
E --> exclude categories
{TAGCLOUD:E:5,18,24,124........:S:314}
314 = Article ID of "SEARCH page"
5,18,24,124... ==> IDs of Site structure levels / categories in all the articles reside you DO NOT want to be matched/analyzed the cloud of.
Conclusion/Summary: TAGCLOUD RT
in brief and for example:
{TAGCLOUD:E:2,6,162:S:57} or
{TAGCLOUD:I:1,5,16,18:L:128}
TagCloud for phpwcms works fine, reliable, stable and [--> because of SQL_CACHE] --> runs very fast! When you are a WebAdmin just run TagCloud once for testing/preview and then --> your site visitors [Boom, Bang!] will have the cloud already rendered and saved [read/fetched from --> MySQL_CACHE] during [msec] milliseconds. [as long as content wasn't changed -- but, anyway, after the new, changed content was called {again just} once, the subsequent visitors {Boom, Bang!} will have the {cached again new} cloud...displayed on the page.]
PLEASE NOTICE: (RTFM := read the fckn manual inside code)
still [only] your content of --> blogs, recipes will be ignored [agreeable? otherwise -->]
ANY improvements, suggestions, experience appreciated!!!
ANY questions? --> VSeeme ID: jens or post to this thread...
Happy Easter 2008!
################################# download newest v.1.1
http://forum.phpwcms.org/viewtopic.php?p=101848#p101848
####################################################
Last edited by Jensensen on Fri 4. Apr 2008, 00:35, edited 2 times in total.
Re: TagCloud for phpwcms [v1.0]
This sounds like a perfect cloud
German: is ja ne Wolke
German: is ja ne Wolke
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Re: TagCloud for phpwcms [v1.0]
Hi claus,
[i'm glad you are back with your 64bit-peek-poke-supercomputer-teraGB-workstation]
board's post will now be {pleasant} worth reading again!]
this is just "Schall und Rauch" - all hollow words, you know, somehow [aero-celestial-religious-cosmetic-popular-useful-visual-impressive-game-stuff] in a way that even market-researcher are undetermined. Well, for phpwcms it wasn't that easy because we [default] --> have no --> landing page [for each tag cloud link] but with S your links run into your search page...you have one? {actual i have none} --> but is very convenient...was marcus' idea..less editing work.
L:x for landing page ID:x still is working and can be useful but means [much] more work additionally --> placing all needed anchor tags on landing page {article ID:x}
[i'm glad you are back with your 64bit-peek-poke-supercomputer-teraGB-workstation]
board's post will now be {pleasant} worth reading again!]
this is just "Schall und Rauch" - all hollow words, you know, somehow [aero-celestial-religious-cosmetic-popular-useful-visual-impressive-game-stuff] in a way that even market-researcher are undetermined. Well, for phpwcms it wasn't that easy because we [default] --> have no --> landing page [for each tag cloud link] but with S your links run into your search page...you have one? {actual i have none} --> but is very convenient...was marcus' idea..less editing work.
L:x for landing page ID:x still is working and can be useful but means [much] more work additionally --> placing all needed anchor tags on landing page {article ID:x}
It really is that way perfect that there is no need to add TagCloud as a MODule, as I mentioned at the beginning, because now it is SQL_cached and available whenever needed/requested and [even on huge web sites] as fast as the page itself on which to be displayed...claus wrote:This sounds like a perfect cloud ...
- heliotrope
- Posts: 33
- Joined: Fri 14. Sep 2007, 15:21
Re: TagCloud for phpwcms [v1.0]
Hi Jensensen ,
Great hack this TagCloud !
Installed successfully in 10 minutes...
Great to have the possibility to choose which elements you want to include into match (article title, subtitle, summary...etc )
The "exclude" function is also usefull !! (thanks marcus@localhorst)
BUT
Is there a possibility to choose ONLY "*keywords*" (added in "keywords" field of each article) ??
Thanks a lot !
Great hack this TagCloud !
Installed successfully in 10 minutes...
Great to have the possibility to choose which elements you want to include into match (article title, subtitle, summary...etc )
The "exclude" function is also usefull !! (thanks marcus@localhorst)
BUT
Is there a possibility to choose ONLY "*keywords*" (added in "keywords" field of each article) ??
Thanks a lot !
Re: TagCloud for phpwcms [v1.0]
Hi heliotrope,heliotrope wrote:...Is there a possibility to choose ONLY "*keywords*" (added in "keywords" field of each article) ??...
thank you for your feedback. I am pleased you like it...
To "cloud" only --> article keywords could be possible but 'keywords only' would contradict the originally idea of "Tag Clouds"...which usually are based on the 'whole' {analyzed} content of a web site. Do you really need...a "keyword_only_cloud"?
Last edited by Jensensen on Sat 2. Aug 2008, 00:33, edited 3 times in total.
TagCloud for phpwcms [v1.1]
--> for all versions >= v1.2.8 to v.1.3.9++
A) New variable $min_chars introduced
==> Now the fine tuning of the 'cloud' is much easier --> faster editing.
(This time special thanks to Heiko H.)
function: 'cloud' all content --> but only if the word [length] has more than --> characters: x
This means that less words need to/must/can be added to $exclude [speeds up the RT operation].
In other words: You now can easily exclude words like "the", "and", "der", "die", "das" --> just by setting $min_chars = 4 {for example}
Tip for --> fine tuning --> check
1) $min
2) $min_chars
3) $exclude
4) $del
and other variables [see file and comments within]
B) Output [HTML source code] now is completly CSS based.
Add to you CSS file: {all files packaged to ZIP-archive for download)
[x]
TIP
{recommended}
all files in ZIP archive are UTF-8 --> no BOM
but might be a good idea to --> change | save | upload the [WHEN EDITED] file "tagcloud_v1.1.php" encoded with the same charset as defined in -- > /config/phpwcms/conf.inc.php
INSTRUCTIONS
{generally}
http://forum.phpwcms.org/viewtopic.php?p=101142#p101142
Any feedback appreciated. Thank you.
Have fun with the newest, improved, certified, checked, approved, fast, reliable, valid --> Tag Cloud v1.1 for phpwcms...
it's --> away !!!
A) New variable $min_chars introduced
==> Now the fine tuning of the 'cloud' is much easier --> faster editing.
(This time special thanks to Heiko H.)
function: 'cloud' all content --> but only if the word [length] has more than --> characters: x
This means that less words need to/must/can be added to $exclude [speeds up the RT operation].
In other words: You now can easily exclude words like "the", "and", "der", "die", "das" --> just by setting $min_chars = 4 {for example}
Tip for --> fine tuning --> check
1) $min
2) $min_chars
3) $exclude
4) $del
and other variables [see file and comments within]
B) Output [HTML source code] now is completly CSS based.
Add to you CSS file: {all files packaged to ZIP-archive for download)
[x]
TIP
{recommended}
all files in ZIP archive are UTF-8 --> no BOM
but might be a good idea to --> change | save | upload the [WHEN EDITED] file "tagcloud_v1.1.php" encoded with the same charset as defined in -- > /config/phpwcms/conf.inc.php
INSTRUCTIONS
{generally}
http://forum.phpwcms.org/viewtopic.php?p=101142#p101142
Any feedback appreciated. Thank you.
Have fun with the newest, improved, certified, checked, approved, fast, reliable, valid --> Tag Cloud v1.1 for phpwcms...
it's --> away !!!
Last edited by Jensensen on Fri 19. Sep 2008, 20:20, edited 2 times in total.
Re: TagCloud for phpwcms [Update v1.1]
still works fine [tested today] with v.1.3.9 DEV r_155
but don't forget - just after installation - to switch to
/config/phpwcms/conf.inc.php
but don't forget - just after installation - to switch to
in$phpwcms['allow_cntPHP_rt'] = 1; //allow PHP replacement tags and includes in content parts
/config/phpwcms/conf.inc.php
Re: TagCloud for phpwcms [Update v1.2]
Hi folks and friends,
the new TagCloud v1.2 for phpwcms is available NOW!
changelog:
- some minor/major improvements handling utf-8 and iso latin else characters. (should work on any site now.
I don't know how to work with "locale" but I really hope, that the added function works even faster than "mb_strtolower" to keep "TagCloud" the fastest ever.)
- tested with v1.3.9 r248
INSTRUCTIONS
{generally}
http://forum.phpwcms.org/viewtopic.php?p=101142#p101142
http://forum.phpwcms.org/viewtopic.php?p=101848#p101848
(keep an eye on comments in the script)
Any feedback appreciated. Thank you.
Have fun with the newest, improved, certified, checked, approved, fast, reliable, valid --> Tag Cloud v1.2 for phpwcms...
it's --> free !!!
the new TagCloud v1.2 for phpwcms is available NOW!
changelog:
- some minor/major improvements handling utf-8 and iso latin else characters. (should work on any site now.
I don't know how to work with "locale" but I really hope, that the added function works even faster than "mb_strtolower" to keep "TagCloud" the fastest ever.)
- tested with v1.3.9 r248
INSTRUCTIONS
{generally}
http://forum.phpwcms.org/viewtopic.php?p=101142#p101142
http://forum.phpwcms.org/viewtopic.php?p=101848#p101848
(keep an eye on comments in the script)
Any feedback appreciated. Thank you.
Have fun with the newest, improved, certified, checked, approved, fast, reliable, valid --> Tag Cloud v1.2 for phpwcms...
it's --> free !!!
Last edited by Jensensen on Sat 6. Sep 2008, 00:47, edited 1 time in total.