Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[ FREE PLUGIN ] ULTRAGlobals - Collection of Globals and routines

(Page 6 of 10)
> > > >
Quote Reply
Re: [Alba] Ideas please In reply to
Hi,

Done.

Next to each download, you should see stuff like:

Quote:
last updated: Sat May 10 06:27:09 2008

Hopefully thats ok Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Ideas please In reply to
Quote:
Next to each download, you should see stuff like:

That is a great help, thanks.
Quote Reply
Re: [Andy] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Version 3.3.4 has just been uploaded to our site.

http://www.ultranerds.com/...s/ULTRAGlobals_L217/

This includes a new feature - Split_Up_Paragraphs()

This lets you do any of 3 things:

1) Split the Description into Description1 (the first paragraph), and Description2 (the remaining paragraphs)
2) Split the Description into one tag per paragraph (i.e Description1,Description2,Description3,Description4, etc)
3) Split at the "half way" point of the Description, into Description1 and Description2.


Its all tested fine my end - but if anyone finds any problems, please let me know.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ ULTRAGlobals ] Ideas please In reply to
Hi Andy,
perhaps I'm searching with the wrong searchwords,
but is there a global that shows the 10 most reviewed links?

Would be great to have this global in the ultra globals plugin!

Thanks

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Nope, there isn't anything in there that does that. I'll try to add it in tomorrow/monday. Got a few other things that I need to get done first though =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Matthias70] [ ULTRAGlobals ] Ideas please In reply to
Hi,

I just wrote this - should work fine (tested it ok)


xx_reviews
Code:
sub {

my $db = $DB->table('Reviews');
$db->select_options( "GROUP BY Review_LinkID","ORDER BY review_count DESC","LIMIT 5");
my $sth = $db->select("Review_LinkID", "COUNT(*) as review_count") or die "Query Error: $GT::SQL::error";

my $back;
my @loop;
while (my ($s, $c) = $sth->fetchrow_array) {
# my $url = $CFG->{db_cgi_url} . "/review.cgi?username=$s";
my $link = $DB->table('Links')->get( { ID => $s } );

if (!$link->{isValidated}) { next; }

push @loop, { %$link, ReviewCount => $c }
#$back .= qq| <a href="$CFG->{db_cgi_url}/reviews.cgi?ID=$s">$link->{Title}</a> ($c reviews) <br />|;
}

# return \$back;
return { Most_Reviewed_Links => \@loop }

}


..then call in any template with:

Code:
<%xx_reviews%>

<%loop Most_Reviewed_Links%>
<a href="<%config.db_cgi_url%>/reviews.cgi?ID=<%ID%>"><%Title%></a> (<%ReviewCount%> reviews) <br />
<%endloop%>

I've gotta go out now - but will look at adding it to the plugin later on =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ ULTRAGlobals ] Ideas please In reply to
Hi Andy,
it's working perfect ;-)
Just one thing
Code:
<%xx_reviews%>

<%loop Most_Reviewed_Links%>
<a href="<%config.db_cgi_url%>/reviews.cgi?ID=<%ID%>"><%Title%></a> (<%ReviewCount%> reviews) <br />
<%endloop%>

should be
Code:
<%xx_reviews%>

<%loop Most_Reviewed_Links%>
<a href="<%config.db_cgi_url%>/review.cgi?ID=<%ID%>"><%Title%></a> (<%ReviewCount%> reviews) <br />
<%endloop%>


Thanks

Matthias
gpaed.de

Last edited by:

Matthias70: Sep 28, 2008, 9:57 AM
Quote Reply
Re: [Matthias70] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Cool, I've released the new version (2.3.5), and this can be downloaded from our site now :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ ULTRAGlobals ] Ideas please In reply to
Obviously you know nothing about relational queries. If you have the Link ID in the Reviews table then you should be using a RELATIONAL query to retrieve the link record and not selecting the ID from the Reviews table and then performing a second query to fetch the record from the Links table.
Quote Reply
Re: [Wychwood] [ ULTRAGlobals ] Ideas please In reply to
Well yeah, you COULD - but we don't want the review stuff in the loop! (only the link stuff, and review count)

Doing it the way I did it is perfectly fine!

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
The most popular categories In reply to
How to display i.e. top 10 categories or subcategories with most links, kind of:

Subcategory C - 45 links
Subcategory L - 30 links
Maincategory F - 25 links (without links in subcategories)

?
Quote Reply
Re: [katakombe] The most popular categories In reply to
Hi,

Sorry, I'm afraid I'm not sure what you are asking for :/

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] The most popular categories In reply to
Code:
$DB->relation('Reviews', 'Links')->select("Links.*")->fetchrow_hashref

Crazy

Last edited by:

Wychwood: Oct 2, 2008, 2:19 AM
Quote Reply
Re: [Andy] The most popular categories In reply to
Andy wrote:
Hi,

Sorry, I'm afraid I'm not sure what you are asking for :/

Cheers

Andy, let us say that we have only 2 main categories: A & B.

Category A has 2 subcategories: A1 & A2; Category B has 4 subcategories: B1, B2, B3 & B4.

Category A has 50 links in total, but when you click on it, there is no link at all - links are in A1: 40 and in A2: 10

Category B has 100 links in total and they all resist under the main category, all 4 subcategories are empty.

Now, the global should display the following:

B: 100 links
A1: 40 links
A2: 10 links

Note that there is no "A: 50 links" because in fact the main category is empty.
Quote Reply
Re: [katakombe] The most popular categories In reply to
Hi,

Ok, so let me just get this straight =)

Basically, if a link only 0 links in it (not including the sub-categories too), then you want to get the links from the sub-categories? Is that correct?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] The most popular categories In reply to
Andy wrote:
Hi,

Ok, so let me just get this straight =)

Basically, if a link only 0 links in it (not including the sub-categories too), then you want to get the links from the sub-categories? Is that correct?

Cheers

Hello Andy!

Yes, that's right Cool

The global should list them in descending order sorted by the number of links in them, no matter if they are categories or subcategories. The only thing that counts is number of links - not total number including subcategories, just simple links visible after clicking on category/subcategory.
Quote Reply
Re: [katakombe] The most popular categories In reply to
Hi,

Ok, I'm confused again as to what you want?

I thought you just wanted a global - which would get the sub-links, in a category if it didn't have any links itself?

i.e

Test_Cat2 (0 links)
Test_Cat2/Sub 3 (1 link)
Test_Cat2/Sub 4 (3 link)
Test_Cat2/Sub 4/Test (1 link)

...so, if they were viewing the "Test_Cat" category (i.e which doesn't have any links in it, on its own level), then it would get the links from Test_Cat2/Sub 3, Test_Cat2/Sub 4 and Test_Cat2/Sub 4/Test (which would make a total of 5 links showing in "Test_Cat2")

Is that still what you are after?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] The most popular categories In reply to
Hello Andy!

No, I want to display i.e. 10 links to those categories or subcategories which simply have most links. I don't care if on first place is a main category or a subcategory from -10 level in the directory.

The only thing which is important is that the first link goes to a category/subcategory with most links and so on in descending order.

I don't want to see i.e. "Category A: 250 links" and there is in fact only 5 links and 245 are in subcategories which belongs to that main category, in this case "Category A".

To clarify even more, those links will be displayed on a separate page produced by PageBuilder plugin and that page has nothing to do with the rest of directory. That's a page on it's own.
Quote Reply
Re: [katakombe] The most popular categories In reply to
Hi,

Sorry, been a bit busy over the last few days.

I still don't understand what you are after, sorry Pirate

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] The most popular categories In reply to
Hi Andy!

Here are categories and subcategories on the main page:

Category A: 20 links
--Category A-1: 5 links
--Category A-2: 12 links

Category B: 50 links
--Category B-1: 30 links
----Category B-1-1: 24 links
--Category B-2: 4 links

Now, the global should display the following:

1.) B-1-1: 24 links
2.) B: 16 links
3.) A-2: 12 links
4.) B-1: 6 links
5.) A-1: 5 links
6.) B-2: 4 links
7.) A: 3 links

Smile
Quote Reply
Re: [katakombe] The most popular categories In reply to
Ok, that still doesn't make any sense ://

Quote:
2.) B: 16 links

..but you have:

Quote:
Category B: 50 links

..and

Quote:
4.) B-1: 6 links

..but you have:

Quote:
--Category B-1: 30 links

What am I missing? =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] The most popular categories In reply to
If I understand correctly katakombe wants a "Top 10" of categories with the most links but if the top level category has no links then you look under the sub-categories etc. So it's not a Top 10 of top-level categories - it can include sub-categories too.

Last edited by:

Wychwood: Oct 6, 2008, 11:05 AM
Quote Reply
Re: [Wychwood] The most popular categories In reply to
Wychwood wrote:
If I understand correctly katakombe wants a "Top 10" of categories with the most links but if the top level category has no links then you look under the sub-categories etc. So it's not a Top 10 of top-level categories - it can include sub-categories too.

Finally!

SmileCool
Quote Reply
Re: [Andy] The most popular categories In reply to
Andy wrote:
Ok, that still doesn't make any sense ://

Quote:
2.) B: 16 links

..but you have:

Quote:
Category B: 50 links

..and

Quote:
4.) B-1: 6 links

..but you have:

Quote:
--Category B-1: 30 links

What am I missing? =)

Cheers

You are missing that i.e. B have 50 links in total, but 30 (B-1) + 4 (B-2) = 34 links in subcategories, so there are only 16 links directly in B etc ...
Quote Reply
Re: [katakombe] The most popular categories In reply to
Right ok - thanks for clearing that up Wychwood =)

I'm busy for today (got a few large jobs on), but I'll see if I can take a look tonight/tomorrow for you.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
> > > >