Gossamer Forum
Quote Reply
Real Number of Links
I would like to have the real number of homepages instead of Links inside my page:

Example:

I have 100 countries and only one homepage www.google.de; then i put this link one time in every country.
Suddenly i have 100 links at my home.

More complicated:
I have continents like australie, europa,
inside europa i have 20 countries, but again i have only google.com one time in every country.
Again i have 20 links at home and 20 links in europa.


I want to have one link at home, one link for europe and one link for every country.

I just start with this quest and have still no answer how to fix this. Maybe you have an idea for my?


The real problem as an example is:

1. Continents
2. Coutries
3. Cities

To make it more complicated: We have Links in all the levels, but not always.
A link could be in europe, but in no city or in europe and countries but not in a city or only in a city or only in a country and so on. Everything is possible.

Maybe i will try it in php with arrays to get rid of the double counting of links:

select continents
while
select links in an array
select countries
while
select links in an array
select cities
select links in an array

array[catid][linksid] = should be only 1

then sum all arrays with one to the number of links for this cat.

Somewhow like this it should be possible.
Quote Reply
Re: [Robert] Real Number of Links In reply to
Hey Robert,

Did you take a look at the Ultraglobals Plugin from Andy?
It has Get_Totals_Links where you can probably do what you want or at least get some inspiration.

Cheers

n||i||k||o