Tag cloud from keywords - Page 6 Tag cloud from keywords - Page 6
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Tag cloud from keywords

Started by Aditya Mooley, December 20, 2005, 07:55:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Saif

will this work with coppermine 1.4.25 ?

Joachim Müller

This thread is tagged as being for cpg1.4.x. In my book, this includes cpg1.4.25 as well as cpg1.4.3819. So yes, this mod is designed to be used with any version of the cpg1.4.x series, and this includes cpg1.4.25.
We can't tell for sure, as it's simply beyond the scope of this board to test each available mod or hack with each new maintenance release. Why don't you try it for us: apply the mod and let us know if it worked for you or not. This would be a good way to give something back to the community. Taking into account your negative record on this forum it's about time for you to become a giver instead of being a taker constantly. Don't come up with lame excuses like "I'm not a coder" - you don't need to be a coder to apply this mod, test if it works and post feedback here in this thread. Nobody has been born as a coder - you live and learn.

Anyway, I can see what your issue is: this mod suggests to replace one of coppermine's files with a modified file that is based on an outdated version of coppermine, which can be a bad idea in terms of security and stability. The instructions of this mod never should have been put the way they are. I will try to make that up and post instructions that should work (see next posting).

Joachim Müller

Here are the revised instructions to use this mod: do not replace the entire core file as the initial posting in this thread suggests. Instead, apply these steps:

Edit include/keyword.inc.php with a plain text editor

Find  $keywords_array = array();and add after it (into a new line)  $keyword_count = array();




Find        if (!in_array($word = utf_strtolower($word),$keywords_array)) $keywords_array[] = $word;and replace with        if (!in_array(strtolower($word),$keywords_array)) {
          $keywords_array[] = $word;
          $keyword_count[$word] = 1;
        } else {
          $keyword_count[$word]++;
        }

      



Find    echo "<a href=\"thumbnails.php?album=search&amp;search=".$keywords_array[$i]."\">$keywords_array[$i]</a>";and replace with    $em = ($keyword_count[$keywords_array[$i]] < 6) ? 12 : (12 + (int)(($keyword_count[$keywords_array[$i]] - 5) / 5)) * 2;
    if ($em > 24) {
      $span = 'font-size: 24px; font-weight: bold;';
    } else {
      $span = "font-size: {$em}px;";
    }
    echo "<a href=\"thumbnails.php?album=search&amp;search=".$keywords_array[$i]."\"><span style='$span'>$keywords_array[$i]</span></a>";

   



Find      echo " | ";and replace with      echo " ";

Saif

Thank you Joachim Müller for the help. I use dreamweaver as my editor. I edited the file as you said & attached herewith this post. But sadly i m unable to find the tag cloud on search page.I edited the keyword.inc.php in the include dir. & made a text copy & attached with my post.

http://www.orangewallpapers.com/search.php

Saif

Its working, thank you GuaGau for the help. Anyone can download the attachment file from this post, rename it to keyword.inc.php & overwrite incude/keyword.inc.php. Thank you for the mod. It will bring a tag cloud on search.php.

http://www.orangewallpapers.com/search.php

Joachim Müller

Quote from: Saif on November 23, 2009, 06:12:32 AMAnyone can download the attachment file from this post, rename it to keyword.inc.php & overwrite incude/keyword.inc.php.
No, that's exactly what people should not do. Instead, they should to as I suggested above and apply the mod with the FIND/REPLACE instructions posted above. It was a silly idea in the first place to offer a pre-modded file. That idea was corrected. I understand that you're trying to help others, but it's a bad idea to continue with something that was a bad idea in the first place.

brawsky


brawsky

Thank you  ;) ;)
_________________________________________________

Abu Ja football Lani was used instead of dice. gclub in South Africa. To create a high with gclub different these




ohooahaa

Hello everyone I just came Register. Thanks for the great info.
__________________________________________________________________________________________________
คาสิโนออนไลน์-คาสิโน-แทงบอล-แทงบอลออนไลน์-บาคาร่าออนไลน์