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

Pagebuilder user pages questions

Quote Reply
Pagebuilder user pages questions
Hi,

I've got a few questions to do with using the Pagebuilder user pages feature of the plugin.

Here's what i've got setup so far, added a new pagebuilder page:

Page Type: User
Page Name: User-page
Page Title: User-page
Page Condition: Status = Registered
Build Static: Yes
Build Directory: designers/<%Username%>
Build Filename: index.php
Display Dynamic: No

Q1) Is it possable to add an additional Page Condition so pagebuilder will only build user pages where that user has 1 or more links Validated in the directory?

- The only place I've seen the links associated with users data is in Database > Users - example: Links (2): View | Modify | Delete - would I need to modify the plugin to retrieve this data so I can add a Page Condition for this?


I see the default template for user pages within pagebuilder comes with the following Tags:

- all tags of the page definition
- all tags of a user
- title_linked
- title_unlinked
- next, next_url
- prev, prev_url
- sub_page_loop
- link_loop
- link_total
- review_loop

By adding <%link_total%> to the User-page.html template each page displays the total amount of links that user has in the directory.

Q2) How would I go about setting up link_loop to display the links.html template for the links that user own's?


Thanks very much for your help,



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

Quote Reply
Re: [Chas-a] Pagebuilder user pages questions In reply to
Search for <%display_users_links%> it will give full details of the global.

sub {
my $output;
my $sth = $DB->table('Links')->select( { LinkOwner => $USER->{Username} } );
while (my $rec = $sth->fetchrow_hashref ) {

$output .= Links::SiteHTML::display('link4', $rec );

}
return $output;
}

Regards

minesite
Quote Reply
Re: [minesite] Pagebuilder user pages questions In reply to
  
Here's the modified Sub im using based on the one you posted Bruce.

Code:
sub {
my $output;
my $sth = $DB->table('Links')->select( { LinkOwner => $USER->{Username}, isValidated => 'Yes' } ) || return $GT::SQL::error;
while (my $rec = $sth->fetchrow_hashref ) {
$output .= Links::SiteHTML::display('link', $rec );
}
return $output;
}

Have I got this right? - that Sub will display links for whichever logged in member is viewing it and only show their links (if they have any in the directory)?


What im hoping to do is setup a Static (or dynamic) User page that anyone can view associated with that user.

eg. Site designed by: <a href=<%path-to-pagebuilder-user-page%>">Some_Agency</a>

Thanks again for your help,



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

Last edited by:

Chas-a: Jun 29, 2004, 7:13 PM
Quote Reply
Re: [Chas-a] Pagebuilder user pages questions In reply to
 
Figured it out Smile

For displaying user owned links on static pages using pagebuilder i used:

Code:
#user_links Sub
sub {
my $LinkOwner = shift;
my $output;
my $sth = $DB->table('Links')->select( { LinkOwner => $LinkOwner, isValidated => 'Yes' } ) || return $GT::SQL::error;
while (my $rec = $sth->fetchrow_hashref ) {
$output .= Links::SiteHTML::display('link', $rec );
}
return $output;
}
And you call it from your page using:

<%user_links($Username)%>



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