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

[ FREE PLUGIN ] ULTRAGlobals - Collection of Globals and routines

(Page 2 of 10)
> > > >
Quote Reply
Re: [Andy] [ ULTRAGlobals ] Ideas please In reply to
Hi,

I've just released version 1.5.5.

This version now has a New_Image() function, for showing an image, depending on how old the link is.

It based on the Days_Old plugin (which , AFAIK - doesn't work with GLinks at all)

You can download the latest version from our site, here:

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

..or from the "Plugin Download" area, from within your GLinks admin area.

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:

Great set of globals to by the way - thanks for your efforts.

In relation to the New_Image sub, this doesn't appear to work in conjunction with subcategory.html ....

Also, in relation the some of the other subs, eg. New Listings, Most Popular etc, whilst being able to include these for all categories is very handy, is there some way to also use them for each category eg. if there is a Category of Health and 10 other sub-cats, it will only display the listings eg. new, for the Health Category and the sub-cats...?

I recall something about the use of fatherid or similar .... I recall Ian had something similar in his Toolbox compilation.

All the best,


Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Quote:
Great set of globals to by the way - thanks for your efforts.

No problem - I know what a mission it is trying to find the globals you want (not so much now - as I just write my own - but for the non-programmers, its a real PITA ;))

Quote:
In relation to the New_Image sub, this doesn't appear to work in conjunction with subcategory.html ....

Ah - thats because its not designed to work with subcategory.html :)

I'll see if I can make a routine to work with that though - shouldn't be hard.

Quote:
Also, in relation the some of the other subs, eg. New Listings, Most Popular etc, whilst being able to include these for all categories is very handy, is there some way to also use them for each category eg. if there is a Category of Health and 10 other sub-cats, it will only display the listings eg. new, for the Health Category and the sub-cats...?

I recall something about the use of fatherid or similar .... I recall Ian had something similar in his Toolbox compilation.

Mmm.. not sure what you mean on this one?

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,

I've added the New_Image_Cat() function now in version 1.6 (on the site now);

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

Not sure what you are on about with the other stuff, but let me know, and I'll see what I can do Tongue

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:

Thanks for this - works like a charm.

What I am getting at is rather than showing new listings in ALL categories on any page .... show new listings ONLY in that category and the sub-categories.

eg. In the top category 'Health' using the global it would list the top 5 New Listings ONLY in that category and ALL sub-categories of the main Health category.....

Hope that makes sense.....

Thanks again for the update to ULTRAGlobals.


All the best,


Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Give the latest version a go :)

1.6.5

This has a new function:

Code:
<%Plugins::ULTRAGlobals::New_Links_By_Category()%>

<%loop new_links_in_this_cat%>
<%include link.html%>
<%endloop%>

You can get the new version from our site 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] [ ULTRAGlobals ] Ideas please In reply to
Geez you're quick!

Thanks a lot, I'll give it a go.

Regards,


Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Quote:
Geez you're quick!

Yeah, was a pretty simple one to write Smile

Quote:
Thanks a lot, I'll give it a go.

No problem.

Cheerrs

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
Andy wrote:

Code:
<%loop new_links_in_this_cat%>
<%include link.html%>
<%endloop%>

Hi Andy,
when I'm using the above code, I get the following error?

Code:
GT::SQL::Table (11389): Wrong argument passed to this subroutine. No category id passed to children
Thanks
Matthias

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

Are you trying this in category.html, or home.html?

It *has* to be in category.html - otherwise it won't work.

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
Andy wrote:
Hi,

Are you trying this in category.html, or home.html?

It *has* to be in category.html - otherwise it won't work.

Cheers

Hi Andy
there is no output in category.html ?

Matthias

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

I've just released version 1.7.0 Smile

This now includes 2 new functions:

1) Format_Checkbox_Field()
2) Format_Radio_Field()

You can get the latest version from our site: http://www.ultranerds.com/...s/ULTRAGlobals_L217/

These 2 new functions let you vgenerate both "radio" and "checkbox" fields on your "add" and "modify" forms - with the data pre-filled in (i.e automatically selects the right ones)

An example of the checkbox one:


Code:
<%Plugins::ULTRAGlobals::Format_Checkbox_Field('Field_Name')%>

<%loop checkbox_loop%>
<input name="<%field_name%>" id="<%value%>" type="checkbox"value="<%value%>" <%if selected%>checked<%endif%> />
<label for="<%value%>"><%name%></label>
<%endloop%>

There is literally one parameter to pass in (in the first line) - and the rest is done 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!
Quote Reply
Re: [Matthias70] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Whoops, thats a documentation error :)

You need to use:

Code:
<%Plugins::ULTRAGlobals::New_Links_By_Category($ID)%>

...not:

Code:
<%Plugins::ULTRAGlobals::New_Links_By_Category()%>

I'll get the documentation updated.

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've updated the v1.7.0 version, with the revised documentation for that function 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] [ ULTRAGlobals ] Ideas please In reply to
Hi,

I've just uploaded version 1.7.5. This has the Get_Domain_Name() function. Basically, it lets you get the domain name from the <%URL%> field in a link. i.e:

<%Plugins::ULTRAGlobals::Get_Domain_Name($URL,include_prefix,strip_www)%>

The 2 options need to be either 1 (true) or 0 (false)

Example usage for the domain http://www.test.com/foo_bar/index.html

<%Plugins::ULTRAGlobals::Get_Domain_Name($URL,1,1)%>
..would give:
http://www.test.com

<%Plugins::ULTRAGlobals::Get_Domain_Name($URL,1,0)%>
..would give:
http://test.com

<%Plugins::ULTRAGlobals::Get_Domain_Name($URL,0,0)%>
..would give:
www.test.com
The new version is available from our site 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] [ ULTRAGlobals ] Ideas please In reply to
Andy:

In respect of New_Links_By_Category it appears to display not only all the new links, but also some others, modified etc. Would it have anything to do with the following section ....?

Code:
if ($hit->{isNew} eq "Yes") { $hit->{isNew} = 1; } else { $hit->{isNew} = 0; }
if ($hit->{isPopular} eq "Yes") { $hit->{isPopular} = 1; } else { $hit->{isPopular} = 0; }
if ($hit->{isChanged} eq "Yes") { $hit->{isChanged} = 1; } else { $hit->{isChanged} = 0; }

I'm only guessing here ....

Regards,



Clint
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] [ ULTRAGlobals ] Ideas please In reply to
Hi,

Are you sure its showing stuff other than isNew ? i.e are you just thinking that because its showing "new" "pop" etc next to you links? Could possibly be something to do with your link.html setup if thats the case.

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
I had the same problem.
I had two new links in a category, but the output was two new links and some older links?
Could'nt find a rule!

Matthias

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

Mmm.. very odd.

Seems that this:

Code:
my $sth = $db_obj->select (['Links.*'], GT::SQL::Condition->new(['CategoryID', 'IN', $all_ids], ['isValidated', '=', 'Yes', 'isNew', '=', 'Yes'] ) ) || die $GT::SQL::error;

is only doing:

Code:
SELECT glinks_Links.* FROM glinks_CatLinks,glinks_Category,glinks_Links WHERE glinks_CatLinks.LinkID = glinks_Links.ID AND glinks_CatLinks.CategoryID = glinks_Category.ID AND (glinks_CatLinks.CategoryID IN (12194,12193,12192) AND glinks_Links.isValidated = \'Yes\') ORDER BY Add_Date DESC Limit 5

...instead of:

Code:
SELECT glinks_Links.* FROM glinks_CatLinks,glinks_Category,glinks_Links WHERE glinks_CatLinks.LinkID = glinks_Links.ID AND glinks_CatLinks.CategoryID = glinks_Category.ID AND ((glinks_CatLinks.CategoryID IN (12194,12193,12192)) AND (glinks_Links.isNew = \'Yes\' AND glinks_Links.isValidated = \'Yes\')) ORDER BY Add_Date DESC Limit 5

The fix is to change this line (in /admin/Plugins/ULTRAGlobals.pm):

Code:
my $sth = $db_obj->select (['Links.*'], GT::SQL::Condition->new(['CategoryID', 'IN', $all_ids], ['isValidated', '=', 'Yes', 'isNew', '=', 'Yes'] ) ) || die $GT::SQL::error;

..to:

Code:
my $cond = GT::SQL::Condition->new('CategoryID', 'IN', $all_ids);
my $cond2 = GT::SQL::Condition->new('isNew','=','Yes','isValidated','=','Yes');
my $sth = $db_obj->select (['Links.*'], $cond, $cond2 ) || die $GT::SQL::error;

I'll get it fixed up in the main version 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
Hi,

I've uploaded version 1.7.6 now - with this fix in;

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

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
Hey Andy,

May I link to your "ULTRAGlobals" download page from my template site?

Thanks,

SandraR
Quote Reply
Re: [Andy] [ ULTRAGlobals ] Ideas please In reply to
Hi Andy:

This is a very useful function .... is there any way it can be modified to deal with multi-select values (including checkboxes). I have a couple of fields that I use checkboxes for but the columns can actually contain multiple values....

Hmmm .... seems like the Advanced Editor is broken ...


Regards,


Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [SandraR] [ ULTRAGlobals ] Ideas please In reply to
SandraR wrote:
May I link to your "ULTRAGlobals" download page from my template site?

Sure thing Cool

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: [Clint] [ ULTRAGlobals ] Ideas please In reply to
Hi Clint,

Quote:
This is a very useful function .... is there any way it can be modified to deal with multi-select values (including checkboxes). I have a couple of fields that I use checkboxes for but the columns can actually contain multiple values....

It should work just fine with multi-checkbox values :) ( (I spent ages trying to get it to work <G>)

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,

I've just released version 1.8.0. This version includes a new function, which I wrote as a global for Coyu here:

http://www.gossamer-threads.com/...?post=300033#p300033

You can use it like so:

Code:
<%if config.bookmark_enabled%>
<%if user.Username%>
<%Plugins::ULTRAGlobals::Check_If_Bookmarked($ID)%>
<%if isBookmarked%>
<%-- already bookmarked , show something here if you want --%>
<%else%>
<a href="<%config.db_cgi_url%>/bookmark.cgi?action=link_add;ID=<%ID%>">Bookmark It</a>
<%endif%>
<%endif%>
<%endif%>

This new version is available from our site.

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!
> > > >