Google Tagged

Started by Yağız..., July 14, 2008, 01:52:17 PM

Previous topic - Next topic

ashsimmonds

High Steaks - meat is life

matasanos

Quote from: ashsimmonds on September 24, 2008, 01:16:57 AM
I just made an SSI function I think.

http://aussieexotics.com/forum

oo this is what i want

can you share the code pleasE?

ashsimmonds

Quote from: matasanos on September 24, 2008, 07:38:35 AM
Quote from: ashsimmonds on September 24, 2008, 01:16:57 AM
I just made an SSI function I think.

http://aussieexotics.com/forum

oo this is what i want

can you share the code pleasE?

Far as I recall it's mostly copied from the other function, there may be stuff in there which is specific to my setup though so definitely make a back-up before pasting this into the SSI.


function ssi_RandomGoogleTags() {

global $query, $context, $row, $highest, $lowest, $maxsize, $minsize, $diff, $steps, $key, $done, $i, $scripturl, $db_prefix;

// $db_prefix = $db_prefix . "smf_";

// PREPARE A TAG CLOUD
// NOW THIS IS COMPLEX BECAUSE THE SAME TAG MAY HAVE BEEN SAVED MULTIPLE TIMES
// DELETED TOPICS WHERE TAGS STILL REMAIN WILL BE IGNORED.

$query = db_query("
SELECT g.tag, g.ID_TAG, g.hits, g.status, g.ID_TOPIC, t.ID_TOPIC
FROM {$db_prefix}googletagged as g, {$db_prefix}topics as t
WHERE g.ID_TOPIC = t.ID_TOPIC
AND g.status != 0
GROUP BY g.tag
ORDER BY RAND()
LIMIT 50
", __FILE__, __LINE__);

// FOUND SOME TAGS?
if(mysql_num_rows($query) != 0) {
// CREATE AN ARRAY FOR TAGS
$context['googletagged'] = array();
// CYCLE THROUGH
$highest = 1 ;
$lowest = 999999999999 ; // SO IT FORCES THE FIRST ROW TO BE THE LOWEST
while($row = mysql_fetch_assoc($query)) {
// STORE THE INFO FOR LATER ON
$context['googletagged'][] = $row;
$highest = ($row['hits'] > $highest) ? $row['hits'] : $highest ;
$lowest = ($row['hits'] < $lowest) ? $row['hits'] : $lowest ;
}
// TIDY UP
unset($row);
// WORK OUT THE SIZES FOR US
// FIRST THE MAX AND MIN SIZES THAT WE CAN USE IN %
$maxsize = 200;
$minsize = 100;
// WHATS THE DIFFERENCE - IF 0, DIVIDING MY ZERO WILL CAUSE AN ERROR
$diff = ($highest - $lowest == 0) ? 1 : ($highest - $lowest) ;
// EVENLY STEP THE TAGS
$steps = ($maxsize - $minsize)/$diff;

// CYCLE THROUGH OUR TAGS
foreach ($context['googletagged'] as $key => $row) {
// ADD THE COLUMN FOR SIZE

$context['googletagged'][$key]['size'] = ceil($minsize + ($steps * ($row['hits'] - $lowest)));
$context['googletagged'][$key]['text'] = str_replace("+", " ", $context['googletagged'][$key]['tag']);
}
// TIDY UP
unset($key,$row,$steps,$highest,$lowest,$maxsize,$minsize);
mysql_free_result($query);

// SECOND POINT - IF NOT REACHED THE END BY HERE - ERROR!!!
$done = true;
}

// START THE TABLE
echo '<table border="0" cellpadding="4" cellspacing="0" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center">
50 Random search terms (what people type into Google that brings them to the forum)
</td>
</tr>
<tr>
<td align="center" class="windowbg2" style="font-size:10px;" >';

// START OUR TAG CLOUD
if(isset($context['googletagged'])) {
$i = 1 ;
// WRITE OUT OUR TAGS
foreach($context['googletagged'] as $key => $row) {
echo '  <a href="', $scripturl , '?action=tagged;id=', $row['ID_TAG'] ,';tag=', $row['tag'] ,'" style="font-size: '.$row['size'].'%;" title="', $row['text'] ,'">', ucwords($row['text']) ,'</a> |';
// INCREASE COUNTER UNTIL WE MAY NEED TO BREAK
// IF DIVISABLE BY 10 - NEW LINE
// echo (($i % 6) == 0) ? '<br/>' : '';
$i++;
}
// TIDY UP
unset($i,$key,$row);
} else {
// NO TAGS, SO TELL THE USER
echo $txt['googletagged_empty'];
}

// END THE TABLE
echo ' </td>
</tr>
  </table>';

        return;

}

High Steaks - meat is life

matasanos

thank you!!!!

now..time to:              try to incorpore it


matasanos

incorporated

all good!!

thanks again

City Builder

The mod reported no errors before installation, it reported it successfully installed the mod.  Upon installation it took me to the settings page, HOWEVER, on every page on my site now, is the following information at the top of every single page:

$txt['googletagged'] = 'GoogleTagged'; $txt['googletagged_admin'] = 'GoogleTagged'; $txt['googletagged_menu'] = 'GoogleTagged'; $txt['googletagged_manage'] = 'Manage GoogleTagged'; $txt['permissionname_googletagged_manage'] = 'Manage GoogleTagged'; $txt['permissiongroup_googletagged'] = 'GoogleTagged'; $txt['googletagged'] = 'GoogleTagged'; $txt['googletagged_admin'] = 'GoogleTagged'; $txt['googletagged_menu'] = 'GoogleTagged'; $txt['googletagged_manage'] = 'Gerenciar GoogleTagged'; $txt['permissionname_googletagged_manage'] = 'Gerenciar GoogleTagged'; $txt['permissiongroup_googletagged'] = 'GoogleTagged';

Perhaps someone can help me fix this problem?

I've already tried uninstalling it and it uninstalled, however the above text remains on the site, reinstalling the mod a second time, only makes the above text duplicated, uninstalling it removes half of it, but the remainder stays.

Where do I look to get rid of that text, what do I do to get my sites running the way it was without all that text at the top of my site?

Thanks,

City Builder

Okay, it appears that the mod placed all that text at the end of the modification.english.php file after the last ?> tag so removing it removed it from the forum, however I wonder how much of the mod remains and might cause problems later on.

Polymath

I've had this installed for a while and It is real good. Lots of mine show in search engines. But I do have an error come up..

http://www.blahblahblah.blah/index.php?action=tagged;id=3211;tag=;start=320 
8: Undefined index:
File: /home/ezmne3/public_html/gamesocket2/Sources/GoogleTagged.php
Line: 195




I know it was not there to start with, but is there now. Pages per day.

Any idea what that is.
* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

Apllicmz

Update that linguage portuguese_pt and utf8



N3RVE

I'll be updating the package this weekend, I'd release a 2.0 version as well ;)

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

JJCp3

Miren gente creo que hize las cosas al reves.. xD
Lo primero que hize fue instalar el mod de google tagged y luego de eso vi el manual y hice los cambios en donde decia, me aparece en la parte del admin pero cuando creo un post no me sale nada para agregar ni cuando veo un post viejo.
y si es que quiero ir a desinstalarlo me dice:
Quote¡No puedes descargar o instalar nuevos paquetes ya que no se puede escribir en el directorio "Packages"!
Pero eso si bien recuerdo se solucionaba creando una carpeta llamada "temp", dentro de la carpeta "Packages", pero despues de que hacia los cambios en los archivos como lo indicaba el manual fui en mi ftp y no habia la carpeta que habia creado de temp antes de instalar el mod claro esta, la cree de nuevo pero me sigue apareciendo el mismo mensaje. Ayuda como lo soluciono?

CiHaD

hi..
if the  tag is longer than 25 characters, i want to ignore the word...
how can i do it ??

SONSiVRi

Quote from: CiHaD on October 12, 2008, 07:02:35 AM
hi..
if the  tag is longer than 25 characters, i want to ignore the word...
how can i do it ??

Work around of those lines in Display.php
Add a condition of what you want.

// implode our array back to a string
$search_terms = implode("+", $search_terms);
$tags = htmlspecialchars(urldecode($search_terms));
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

CiHaD

i tryed.. but i can't it.. :(

Quote from: SONSiVRi on October 12, 2008, 07:09:33 AM
Quote from: CiHaD on October 12, 2008, 07:02:35 AM
hi..
if the  tag is longer than 25 characters, i want to ignore the word...
how can i do it ??

Work around of those lines in Display.php
Add a condition of what you want.

// implode our array back to a string
$search_terms = implode("+", $search_terms);
$tags = htmlspecialchars(urldecode($search_terms));


SONSiVRi

Quote from: CiHaD on October 12, 2008, 11:30:26 AM
i tryed.. but i can't it.. :(

What you tried?
Place your scratch here.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Polymath

#55
What does this mean:

http://www.blahblahblah.blah/index.php?action=tagged;id=3211;tag=;start=320 
8: Undefined index:
File: /home/ezmne3/public_html/gamesocket2/Sources/GoogleTagged.php
Line: 195


And how would I fix it. It is simple I just can not remember

line 195
$ascending = !isset($_REQUEST['desc']);

* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

Polymath

Ok..so this is a dead duck now is it. I assume everybody that has this mod would be getting this error? No??
* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

SONSiVRi

Quote from: Polymath on October 28, 2008, 05:54:37 PM
Ok..so this is a dead duck now is it. I assume everybody that has this mod would be getting this error? No??

Why its located on 195th line, same part is 98th on mine. Did you changed anything or problem is mine?
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Polymath

Havn't changed anything. Pass. I just uploaded it.
* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

Polymath

#59
I have been keeping an eye on it and have come to this conclusion.
Evey ten minutes there is a whole lot of new errors. Now, sometimes the IP address is different within a range. That range if IP's that hits every 10 minutes is Inktomi Corporation a seach engine and it causes an error on every tag it is following.

Any idea what I would do? I don't wish to block it, but maybe I should. I don't even know if it is ok, good or bad. What you think? It don't show up on who is online either, or maybe they do as Inktomi is owned by Yahoo!
* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

Advertisement: