Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Keywords search issue +tag cloud  (Read 2992 times)

0 Members and 1 Guest are viewing this topic.

makk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
    • the hid3out
Keywords search issue +tag cloud
« on: March 23, 2010, 07:34:39 pm »

Hi! I was looking at a post from Joachim Müller earlier: http://forum.coppermine-gallery.net/index.php/topic,25311.msg310637.html#msg310637
When I was gonna ask a related question it said the thread was so old I might start a new thread, and since I have more than one question, I just might do that in here instead!

[yes I have upgraded today to stable 1.4.26]

1.
I made a backup of my include/keywords.inc.php and made a new one with the "FIND/REPLACE instructions" that Joachim provided in the linked thread above! I then started to tag a bunch of my pictures of my ex, me, our animals and children
Somehow, not all keywords seem to work! The word "murko" does work, for some strange reason. That is bolded, since I tagged a lot of the pics with that. Strangely enough the word "Nettan" is not bolded. Instead the keyword Nettan is shown +20 times on the searchpage for me. The same for other words I used aswell (Names like Pontus, Sanna etc.... just look for yourself)

See: http://private.htstart.org/search.php


2.
I was also thinking about maybe putting my keywords on the indexpage (making them visible all the time!)
That would in my case probably be my templates file "template.html" ?
In the menu on my site (use my coppermine link above) you see a small box in the left menu bottom with headline "Testruta" (testbox). I was thinking about maybe use include to just include the keywords there, as ther are included on the search.php

Since that is a .html -page I would probably need to change that name to template.php, and then also make a change in the file "include/init.inc.php" to:
Code: [Select]
// Define some constants
define('USER_GAL_CAT', 1);
define('FIRST_USER_CAT', 10000);
define('RANDPOS_MAX_PIC', 200);
[b]define('TEMPLATE_FILE', 'template.php');[/b]
// Constants used by the cpg_die function
define('INFORMATION', 1);
define('ERROR', 2);
define('CRITICAL_ERROR', 3);

...and then use include on my "template.php" within my template dir! Is that correct thinking? Do I need to change any other file for this in that case? I only use coppermine for personal use, so I already disabled features like accounts, and changing themes etc, so this would not in my eyes be a huge modification!
My issue here is that I have tried doing what I just explained and as you can see, the left menu does not show anything in the testbox

So I must be doing something wrong here!
Any thoughts on both the result of my clickable keywords coming presented like you can see (20 words instead of something really bold) and also to show the keywords on mainpage?

An other place I could consider it to be placed is the mainpage (in my case: http://private.htstart.org/index.php) and maybe use a special "word" for it under admin/settings/albumlist like the ones i have today:
Code: [Select]
breadcrumb/catlist/alblist/random,4/Maybe having something like:
Code: [Select]
breadcrumb/catlist/alblist/[b]keywords[/b]/random,4/ (just showing the words ofcourse, and not the title "keywords" etc.)
Is that applicable maybe?


(I made backups of all original files of course, so I will just switch it back if I am not happy with result)

Logged

makk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
    • the hid3out
Re: Keywords search issue +tag cloud
« Reply #1 on: March 23, 2010, 09:07:29 pm »

Note to mods|admins:
Just realized I didn't put this in the same board as the original one :/
If this in fact should have been in (for instance) http://forum.coppermine-gallery.net/index.php/board,74.0.html, then I appologize and hope you might move it there!
Logged

makk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
    • the hid3out
Re: Keywords search issue +tag cloud
« Reply #2 on: March 25, 2010, 01:13:04 pm »

Adding**

I will add a screenie in this post instead, just in case, if I change anything making the first post unrelated...... If the link in the first post doesn't show you, this screenie will!


It seems after some looking .... that only keywords starting with upper case gets really messed up!
Words with only lower case seem fine.




I was also looking at this part of the code (taken from Joachims thread that I linked to in this threads first post):

Code: [Select]
$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>";

I am not sure I understand completely (I am not a coder. I just try learning by doing :)) but after some testing there is really only 2 types. Normal, and then the 24px bold so I guess that's it.
(Changing that to 3 types. Normal + 24px + 24px bold maybe?)

Anyone with suggestions to add even more sizes depending on number of keywords?

Maybe like
1-4 original size
5-10 + a couple of pixels
11-18 etc
19-28 etc
29-40 etc
41+ etc

Maybe even adding different coloring (not sure I would use that, but would be neat to know how)
I would also prefer some kind of limitation to how many keywords would be shown (if actually using it like a correct tag cloud)
Maybe put the limit to 100 keywords (showing the most pupular of course)
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.