Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Adding LinkOwner page

Quote Reply
Adding LinkOwner page
Hi,

Would appreciate any thoughts you have on this or if its even possible, did a search on the Links SQL forums and it doesn't seemed to have come up before.

What im hoping to do is add a LinkOwner page for each user with validated links, for example say LinkOwner Some_Design_Agency has 5 sites listed, with each site listing im hoping to setup a Site designed by: Some_Design_Agency link that goes through to a company details page.

Was thinking of using the Detailed pages for this perhaps something like....

# Added to the links.html page

<%if LinkOwner !eq "admin"%>
Site designed by: <a href="<%detailed_url%>"><%LinkOwner%></a>
<%endif%>

Trouble with this method is detailed_url will return a unique page for each listings so to use the example above Some_Design_Agency will have 5 identical pages with their company details info.

Thanks for your help,



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Quote Reply
Re: [Chas-a] Adding LinkOwner page In reply to
Hello

I am not sure but check if this is what you are looking for..
http://2muslims.com/...=user&user=admin
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [Chas-a] Adding LinkOwner page In reply to
I did something similar before. I can't find the link for it now though :(

This is how I did it;

1) Add a new template, called "user_details". On this template, add a global called "grab_users_details";

Code:
sub {

my $user = $_[0];

# just check we have a username passed, and that
# it isn't the admin one...
return if $user eq 'admin';
return if !$user;

# setup our array
my @links;

# grab the users links :)
my $sth = $DB->table('Links')->select( { LinkOwner => $user } )
|| return $GT::SQL::error;
while (my $hit = $sth->fetchrow_hashref) {
push @links, $hit;
}

$links[0] ? return { users_links => \@links } : return;


}

You then need to put this on the template;

Code:
<%grab_users_details($user)%>
<%if user_links%>
<%loop user_link%>
<%include link.html%><BR>
<%endloop%>
<%endif%>

Then, just call it via;

http://www.yoursite.com/cgi-bin/page.cgi?p=user_details&user=myusername

Hope that helps Smile (its all untested, as I'm just doing this from memory... apologies if it doesn't work right away).

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: Adding LinkOwner page In reply to
 
Have setup pagebuilder to do a static build and this works great when setting the Page Condition to Status = Registered.

Have started a new thread relating to pagebuilders user features here

Thanks you two :)



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile