if statements

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

if statements

Postby Spalace » Sat Nov 19, 2005 9:15 pm

I've got two sites that both use coranto one is a sports site and the other is for a band.

What I'd like to be able to do is when a person's name is mention it gets linked to their profile.

I'm sure it can be done using IF Satements but I've not used these before so dont know the best way to implement this.
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby bozoka45 » Sat Nov 19, 2005 11:50 pm

You'll need to use the addon Maginot and create a new profile to split newsitems by user. Then, you can use the field <MaginotURL: user_split_profile> (or whatever the name of your profile might be) to link.
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby Spalace » Sun Nov 20, 2005 4:59 pm

Thanks, I've already got Maginot installed so will have a look through the documentation and see how I get on.
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Re: if statements

Postby Parahead » Mon Nov 21, 2005 7:51 pm

spalace wrote:What I'd like to be able to do is when a person's name is mention it gets linked to their profile.

I'm sure it can be done using IF Satements but I've not used these before so dont know the best way to implement this.
I don't see where If-statements should come in to play to solve this? Anyway, you may want to take a look at the SUP addon available at the addon page, it sounds like it creates the user profile pages you want?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Re: if statements

Postby Spalace » Tue Nov 22, 2005 9:08 am

Parahead wrote:
spalace wrote:What I'd like to be able to do is when a person's name is mention it gets linked to their profile.

I'm sure it can be done using IF Satements but I've not used these before so dont know the best way to implement this.
I don't see where If-statements should come in to play to solve this? Anyway, you may want to take a look at the SUP addon available at the addon page, it sounds like it creates the user profile pages you want?


I dont think I explained the problem quite right maybe its the wrong use of words.

On my site www.superpalace.co.uk I report about news concerning Crystal Palace Football club. In the articles players names will get mentioned and what I'd like is for that players name to be linked to thier squad profile page.

On a different site that I'm working on for a band, I'd like for the same thing to happen so when ever a band members name is mentioned it links to their page on the site.

i've not had a chance to look through the maginot documentation to see if I need to use the "sliced" profile.
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Tue Nov 22, 2005 1:48 pm

To achieve this I think you would need the Anne Rice addon. It searches for text %1 and replaces it with text %2, so that you could replace every instance of, say, John Footballer with:

Code: Select all
<a href="john_footballer.html">John Footballer</a>


etc.

You would have to make all entries manually, though, unless you want to get very, very fancy coding-wise.

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Re: if statements

Postby Parahead » Tue Nov 22, 2005 8:22 pm

spalace wrote:I dont think I explained the problem quite right maybe its the wrong use of words.

On my site www.superpalace.co.uk I report about news concerning Crystal Palace Football club. In the articles players names will get mentioned and what I'd like is for that players name to be linked to thier squad profile page.
Now I am a little confused with what you mean by "their squad profile", is it the actual player or the team you refer to?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Spalace » Tue Nov 22, 2005 9:39 pm

SrNupsen wrote:To achieve this I think you would need the Anne Rice addon. It searches for text %1 and replaces it with text %2, so that you could replace every instance of, say, John Footballer with:

Code: Select all
<a href="john_footballer.html">John Footballer</a>


etc.

You would have to make all entries manually, though, unless you want to get very, very fancy coding-wise.

SrNupsen


Thanks, will have a look at the Anne Rice addon.

Parahead wrote:Now I am a little confused with what you mean by "their squad profile", is it the actual player or the team you refer to?


The players profile only, at the moment all the players profiles are broken down into positions:

Goalkeepers
Defenders
Midfielders
Strikers

When I get round to it they will all be on seperate pages for each player.
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby Spalace » Tue Nov 22, 2005 10:24 pm

tried to find the Anne Rice addon but the link in the addon section goes directly to plushpuffin's web page but there is no link on the site to download it.

Has anyone got the latest link to download it?
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Tue Nov 22, 2005 11:24 pm

You have to click the little yellow pussycat at the bottom of the page :)

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Spalace » Wed Nov 23, 2005 9:37 am

SrNupsen wrote:You have to click the little yellow pussycat at the bottom of the page :)

SrNupsen


Oh yeah, cheers :cheers:
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby Spalace » Wed Nov 30, 2005 2:39 pm

Thanks for everyone's help and suggestions the Anne Rice addon is exactly what I needed and its working perfectly :D
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Wed Nov 30, 2005 3:03 pm

Glad to hear that (because we aim to please) :D

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron