fish007 0 Report post Posted March 3, 2010 Is it possible to put a togcloud of the surnames on the firstpage of the site?regards, Share this post Link to post Share on other sites
ojay 0 Report post Posted March 17, 2010 IMHO only with Zirkula.Surname-tagcloud see http://code.zikula.org/tngzI want only the tagcloud too, but the work will be too much. Is it possible to put a togcloud of the surnames on the firstpage of the site?regards, Share this post Link to post Share on other sites
Steven 0 Report post Posted March 17, 2010 I've created a quick and dirty tag cloud, which can be seen on my site at http://www.stevenwillingale.com/tngThe file is attached. Just upload tc.php to your tng folder then put an include in the file where you want the tag cloud to display, i.e. add the following line to your index.php file:<?php include('tc.php'); ?>EDIT:In light of bugs found, amended hopefully bug free file now in post below: Share this post Link to post Share on other sites
theKiwi 0 Report post Posted March 17, 2010 I've created a quick and dirty tag cloud, which can be seen on my site at http://www.stevenwillingale.com/tngThe file is attached. Just upload tc.php to your tng folder then put an include in the file where you want the tag cloud to display, i.e. add the following line to your index.php file:<?php include('tc.php'); ?> Something is amiss in the code somewhere... http://testing.lisaandroger.com/index.php is just printing out some of the code to the page, rather than the results? The error log shows [Wed Mar 17 18:41:01 2010] [error] [client 66.93.200.62] PHP Fatal error: Call to undefined function get_tag_cloud() in /Library/WebServer/Documents/TestingTNG/tc.php on line 82, referer: http://testing.lisaandroger.com/ OK- the problem is the opening php tag at least on my server needs to be <?php not <? Roger Share this post Link to post Share on other sites
ojay 0 Report post Posted March 17, 2010 Something is amiss in the code somewhere...On my site works the surname-cloud.I have only changed the path of the search-URL (delete "/tng")"tag_cloud" href="/search.php?mylastname='Thanks Steven! Share this post Link to post Share on other sites
theKiwi 0 Report post Posted March 18, 2010 Another suggested change...Line 50 should be . '&lnqualify=equals" title="\'' . $tag . '\' returned a count of ' . $count . '">' so that the search is for Last Name Equals. Otherwise it will find occurrences of a last name in other last names - for example Moffatappears in the Tag Cloud, but clicking it would give a list of names that also included MoffattRoger Share this post Link to post Share on other sites
Brett 0 Report post Posted March 18, 2010 In light of Roger's post below, I've amended the attached fileOk, downloaded new file. Placed it in root folder, where TNG lives. Made change at line 49. Lines 19 & 20 unchanged.The following is displayed, even if only loading tc.php:Popular surnamesWarning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vbk/public_html/relativelyknown/tc.php on line 62Warning: ksort() expects parameter 1 to be array, null given in /home/vbk/public_html/relativelyknown/tc.php on line 66Warning: array_values() [function.array-values]: The argument should be an array in /home/vbk/public_html/relativelyknown/tc.php on line 33Warning: Wrong parameter count for max() in /home/vbk/public_html/relativelyknown/tc.php on line 33Warning: array_values() [function.array-values]: The argument should be an array in /home/vbk/public_html/relativelyknown/tc.php on line 34Warning: Wrong parameter count for min() in /home/vbk/public_html/relativelyknown/tc.php on line 34Warning: Invalid argument supplied for foreach() in /home/vbk/public_html/relativelyknown/tc.php on line 42Is having the site 'closed' to non logged in the reason? Share this post Link to post Share on other sites
Steven 0 Report post Posted March 18, 2010 A slight variation on the previous file, this one randomises the tag cloud, rather than have the names in alpha order.One other thing is the heading on line 79 probably needs to be changed to a variable and moved to cust_text.php so the tag cloud is multi-lingual. Will try and do this later if have time.EDIT: Updated file now in post below Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vbk/public_html/relativelyknown/tc.php on line 62This seems to indicate it does not like the SQL statement (line 61), i dont think having the site closed is the reason as the SQL statement bypasses any filtering, unless calling config or genlib at the start of the file imposses something I'm not aware of.Not sure why its falling over when others seem to be able to use the file OK Share this post Link to post Share on other sites
Brett 0 Report post Posted March 18, 2010 Not sure why its falling over when others seem to be able to use the file OKTried it on 3 domains already running, 1 domain freshly installed just for it, and all fall over at the same error. They are all on the same shared server though, so will try on different host tommorrow. :( Share this post Link to post Share on other sites
theKiwi 0 Report post Posted March 18, 2010 Did you change the first line to be<?php I needed to make that change on my server as it was set to NOT use short opening tags. Note that the download just above called tc1.php uses <?PHP which I think isn't strictly correct either.Roger Share this post Link to post Share on other sites
Brett 0 Report post Posted March 18, 2010 Did you change the first line to be<?php I needed to make that change on my server as it was set to NOT use short opening tags. <?PHP which I think isn't strictly correct either.Thanks Roger, I had changed it to ?php each time. Share this post Link to post Share on other sites
Steven 0 Report post Posted March 18, 2010 This post contains both files with all changes suggested so far, still need to change the file for multi-lingual use though.tc.php - shows cloud in alpha ordertc1.php - shows cloud in random order.Steventc.phptc1.php Share this post Link to post Share on other sites
thewillistree 0 Report post Posted June 23, 2010 This post contains both files with all changes suggested so far, still need to change the file for multi-lingual use though.tc.php - shows cloud in alpha ordertc1.php - shows cloud in random order.StevenI've now added the tag cloud to my home page and it looks fine, and the size of the surnames seems to be in proportion to their volume on the site. HOWEVER, when I compare the figures shown in the 'hover' text with the figures in the Surname List they are not the same. For example, on the tag cloud 'KINGSNORTH' returned a count of 125, but in the Surname List a total of 87 is shown.Any reason why this should be? Share this post Link to post Share on other sites
ojay 0 Report post Posted June 23, 2010 For example, on the tag cloud 'KINGSNORTH' returned a count of 125, but in the Surname List a total of 87 is shown.Any reason why this should be?Do you have more than one familytree in TNG?It counts all the names in the FamilyTrees together. Share this post Link to post Share on other sites
theKiwi 0 Report post Posted June 23, 2010 I've now added the tag cloud to my home page and it looks fine, and the size of the surnames seems to be in proportion to their volume on the site. HOWEVER, when I compare the figures shown in the 'hover' text with the figures in the Surname List they are not the same. For example, on the tag cloud 'KINGSNORTH' returned a count of 125, but in the Surname List a total of 87 is shown.Any reason why this should be?The difference is likely because the tag could is counting everyone - including Living, whereas the Surname page doesn't count Living if you're not logged in.Try logging in to your site and then compare the numbers.Roger Share this post Link to post Share on other sites
Chuchon 0 Report post Posted March 9, 2011 Hello,would it be possible to exclude some names in the tag cloud.For example, I use to write NN (Not Named) as name for unknown people and I don't want this NN (there are a lot) appearing in the tag cloud.Thanks for any help,Christian Share this post Link to post Share on other sites
theKiwi 0 Report post Posted March 9, 2011 Hello,would it be possible to exclude some names in the tag cloud.For example, I use to write NN (Not Named) as name for unknown people and I don't want this NN (there are a lot) appearing in the tag cloud.Thanks for any help,ChristianChange the query line along these lines $result = mysql_query("SELECT lastname, count( lastname ) as mycount FROM `tng_people` WHERE lastname != \"\" AND lastname != \"[--?--]\" GROUP BY lastname ORDER BY count( lastname ) DESC LIMIT 0 , 50"); and you could replace the [--?--] with your NN to exclude them.Roger Share this post Link to post Share on other sites
Chuchon 0 Report post Posted March 9, 2011 Change the query line along these lines $result = mysql_query("SELECT lastname, count( lastname ) as mycount FROM `tng_people` WHERE lastname != \"\" AND lastname != \"[--?--]\" GROUP BY lastname ORDER BY count( lastname ) DESC LIMIT 0 , 50"); and you could replace the [--?--] with your NN to exclude them. Roger Thanks a lot Roger, I added a part of your code to the line I have in tc1.php to have this line : $result = mysql_query("SELECT * FROM ( SELECT lastname, count( lastname ) AS mycount FROM `tng_people` WHERE lastname != \"\" AND lastname != \"NN\" GROUP BY lastname ORDER BY count( lastname ) DESC LIMIT 0 , 20) AS presort order by rand()"); Exactly what I wanted Have a nice evening (or whatever, it's the evening in France)Christian Share this post Link to post Share on other sites
Jay Wilpolt 0 Report post Posted March 9, 2011 Change the query line along these lines $result = mysql_query("SELECT lastname, count( lastname ) as mycount FROM `tng_people` WHERE lastname != \"\" AND lastname != \"[--?--]\" GROUP BY lastname ORDER BY count( lastname ) DESC LIMIT 0 , 50"); and you could replace the [--?--] with your NN to exclude them.RogerRoger, what would be a quick set of directions to use this tag cloud on a page?do you just add <? php include tc.php ; ?> and it shows up?? Thanks in advance for any help JayNevermindOH, I now see the install notes at the beginning of the file.But there does appear to be an extra </div> at the end of each file. Share this post Link to post Share on other sites
Chuchon 0 Report post Posted March 10, 2011 Roger, what would be a quick set of directions to use this tag cloud on a page?do you just add <? php include tc.php ; ?> and it shows up?? Thanks in advance for any help JayNevermindOH, I now see the install notes at the beginning of the file.But there does appear to be an extra </div> at the end of each file.Hello Jay,I use template 8 and here are the lines I added at the end of the latest news (between </div> and </td><br/> <div class="latest_news"><?php include('tc1.php'); ?> </div>You can view my new website to see the result.I also moved the div class from tc1.php to mytngstyle.php (in template to make some changes.Christian Share this post Link to post Share on other sites
Espen Sjursæter 0 Report post Posted August 16, 2011 Where can I find the 'tc.php' file? Share this post Link to post Share on other sites
Steven 0 Report post Posted August 16, 2011 Where can I find the 'tc.php' file?The files are listed in post 12 of this thread or can be downloaded from my website at http://www.stevenwillingale.com/tng/mapdl.php Share this post Link to post Share on other sites
cogden 0 Report post Posted January 1, 2012 This post contains both files with all changes suggested so far, still need to change the file for multi-lingual use though.tc.php - shows cloud in alpha ordertc1.php - shows cloud in random order.StevenThanks for sharing Steven! Share this post Link to post Share on other sites
FredB 0 Report post Posted January 11, 2012 Great item..loving it. Ran ok on my site for about a week....then I started getting the same errors listed in POST #7 above. Intermittent..so I will try again tomorrow.http://tree.fredberardi.comEDIT:1/11/12- Opened site this AM and it is functioning again. No real explanation as to WHY. I tried it last night in different browsers and with cache cleared, but couldn't get it to restart.???? This functioning correctly lasted about an hour..and now I get the errors on the site again!!! Share this post Link to post Share on other sites
FredB 0 Report post Posted January 11, 2012 This was found to be a server related issue, having to do with memory.Once the server errors were corrected, the errors went away.Thanks again for a great piece of code!!! Share this post Link to post Share on other sites