View Full Version : show link count instead of subcategory count
dedoo
05-26-2006, 10:59 AM
Is it possible to change the subdirectory count to total links next to the category on the frontpage?
right now it only counts the number of subcategories and I would like to show the number of links.
dedoo
05-29-2006, 10:08 AM
*bump*
is this hard to make?
neurosis4u
05-29-2006, 11:03 AM
Look at this post (easy to find with the forum search)
http://www.phplinkdirectory.com/forum/showthread.php?t=810&page=3
dedoo
05-29-2006, 12:00 PM
yeah I found that too but the code was removed when I last searched.
I noticed it got reposted again but it does not work completely.
I tried it a few minutes ago
The links in a subcategory deeper than the first do not get included in the count.
DD
IGonza
05-29-2006, 03:19 PM
I know how to do it. But because of this script your directory will be slower.
If you have many categories/subcategories it will take much time to count all links in all categories/subcategories.
Thanks,
Igor.
dedoo
05-29-2006, 03:23 PM
how much slower would this be?
I only have a pretty small directory with 150 categories
which will not get more than about 4k links
Thanks for your input!
IGonza
05-29-2006, 03:28 PM
I'm not sure really. I belive not very slow.
Thanks,
Igor.
P.S. I created that script for the older version of phpLD and it was long time ago. If I will find it on my computer I will give it for free.
dedoo
05-29-2006, 03:41 PM
That would be great and generous Igor
Thanks!
IGonza
05-29-2006, 05:03 PM
Unfortunaly seems I deleted that script. I could create it again, but not now. I have another project now and I'm busy.
Thanks,
Igor.
IGonza
05-30-2006, 09:57 AM
Ok, I created new script, but it works only with mysql. It's not hard to change it to working with other db types.
I made change for the phpLD @version 2.0.0 RC5.2, but I think it's very similar to latest versions.
Open index.php. Add before the last ?> :
Content visible to registered users only.
Find
Content visible to registered users only.
replace with :
Content visible to registered users only.
Find
Content visible to registered users only.
replace with :
Content visible to registered users only.
Find
Content visible to registered users only.
replace with
Content visible to registered users only.
Find
Content visible to registered users only.
replace with
Content visible to registered users only.
Find Content visible to registered users only.
replace with Content visible to registered users only.
That's it.
dedoo
05-30-2006, 11:59 AM
works! I used it for 3.05. Had to be a little inventive though with replacing the codes because not all could be found. Actually none showed exact matches.
some of the codes provided did not have to be changed. I changed all that I thought looked similar and it worked.
I guess I was a bit lucky there :) i know nothing about php lol.
I'll put up the code from my index.php (3.05) file if anyone is interested in using this too.
thank you very much Igor. I really appreciate it and did not expect you to write it again this soon
dedoo
05-30-2006, 12:07 PM
Only counts links btw and no categories but I think thats great.
Just how I wanted it !
IGonza
05-30-2006, 01:14 PM
You are welcome.
BrunoDesign
06-27-2006, 03:48 PM
That's what i was looking for. Thanks a lot!
BrunoDesign
06-29-2006, 09:20 AM
I found another problem with this mod.
When activating linkcount instead of categoriecount the padination wont work anymore. I cant navigate through pages with more results then i setup (in my case 20 results).
Anyone a hint?
IGonza
06-29-2006, 09:38 AM
Are you sure it worked before you added that module?
neurosis4u
06-29-2006, 09:39 AM
Hm.. maybe you made a mistake by inserting the code?
BrunoDesign
06-29-2006, 09:48 AM
I'm sure it worked before inserting the code (i made a backup before). So i changed it back to the old version without linkcount. Thats sad.
Does the code work for you with pagination?
KartKorner
06-29-2006, 09:49 AM
Works on mine. Slows it down a hair but worth it in my opion :)
neurosis4u
06-29-2006, 10:56 AM
Content visible to registered users only.
Yes, it works
BrunoDesign
06-29-2006, 04:19 PM
I dont get it. I did implement the code just the way the mod says.
The only difference to the original ist that i moved the pagination from the footer.tpl into the main.tpl.
IGonza
06-29-2006, 04:28 PM
I can take a look at your problem if you give ftp access.
P.S. Just a little later.
BrunoDesign
06-30-2006, 08:34 AM
Now i had a deeper look inside the code.
Every page seems to count all links of the whole directory. It tries to build a pagination based upon the number of all links.
Maybe some other mod i installed messes with the linkcount.
IGonza
07-03-2006, 12:08 PM
Don't do this (or undo if you've done it already) :
Content visible to registered users only.
This should fix a bug with the pagination.
Thanks,
Igor.
IGonza
07-03-2006, 12:09 PM
Let me know if it works.
Thanks,
Igor.
mphmi
07-22-2006, 09:55 PM
Hi IGonza. I just tried your mod, and it gives me the pagination problem too. Undoing the last code edit only makes page links disappear completely. :confused:
Thanks so much for taking the time to share your coding with the community. I hope this most-wanted enhancement can be edited to perfection, whether it be by you or another contributing coder.
IGonza
07-22-2006, 10:47 PM
what version of phpld do you use?
I looked at the script of phpld3, and I think my code will not work with it.
For it I need some help from the man who created it.
mphmi
07-23-2006, 01:01 AM
I have version 2. I discovered that my pagination is actually not even working completely right without your mod, but when I added your mod, it made it worse. I don't know if it was always that way or another mod I added messed it up... what it's doing: if there should be only two pages for a category, it gives three, with the last page just showing the featured links of the category. With your mod installed, there were three extra pages added, all just showing the featured listings. I haven't added very many mods, and I'd guess the problem would have to either be in include/functions.php or index.php, but I'm not familiar enough with this script's coding to be able to locate what might be causing it. Any guidance would be very much appreciated. It would royally suck to have to reinstall the whole thing and start over with customizing. I would purchase version 3, but from what I've read, a lot of the features I want, such as the proper counting of links per category, still don't come included, so I'd have to do a lot of modding anyway.
Steven Myers
07-23-2006, 01:17 AM
@mphmi: No worries my friend, have a look here: http://www.phplinkdirectory.com/forum/showpost.php?p=21208&postcount=25
Just remove the code you implimented and follow the instructions from the link above in this post.
Let us know if you need anything else.
mphmi
07-23-2006, 02:09 PM
Thanks Steve. Unfortunately, that code doesn't work for me either. The links count is off, and I still I have an extra page being added on.. but that's apparently a glitch in my version of the script and not anything I did, because I tested a new install of version 2, and the problem still existed.
I think I may give version 3 a try. Can anyone point me to a site running the latest release so I can check it out? A demo of the admin would also be helpful.
mphmi
07-23-2006, 05:46 PM
No, I guess the count isn't off with that mod. I was overlooking subcategory links. It adds those in, as it should. The "Total records" is off, but always has been. It doesn't count featured links. For that problem though, I can just remove the code to display the record count. So my only concern right now is about the pagination not stopping where it should, and displaying an extra page with just the featured links on it. It's not a huge problem, but I'm a perfectionist so it's not acceptable to me. Is there a fix for it? I'll most likely end up upgrading, but my budget being very tight, it would be nice to be able to get my directory running with version 2, and upgrade when, ideally, I have some profits coming in.
IGonza
07-23-2006, 06:59 PM
Hi mphmi ,
I can try to help you with phpld 2, just give me ftp access.
Thanks,
IGor.
Steven Myers
07-23-2006, 07:05 PM
IGonza, all FTP access requests should be granted by the user who is requesting the assistance. We know that alot of the members, such as yourself may have experience with helping others in this area, but we don't advise it unless the user is sure they want you to do it for them.
IGonza
07-23-2006, 07:26 PM
Ask David about me.
Anyway, no trust - no help. I will not persuade anyone to spend my time.
Thanks,
Igor.
mphmi
07-23-2006, 07:46 PM
Thanks so much, all, for the fast and diligent support and moderating. I haven't been around these forums long, but Igor seems like a person who's generous and patient with his time and knowledge, and worthy of trust. Through my cPanel, I can create an FTP account just for him, that only gives access to my phpLD directory; and I have all those files backed up just in case anything were to go wrong. So I have no fear. :) I'll PM you the info, IGor. I appreciate this very much.
offordscott
05-09-2007, 04:01 PM
I'm not convinced that the pagination works with this mod for links in a top category that have subcategories.
scott
IGonza
05-09-2007, 04:38 PM
This mod has not support.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.