Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 01:50 pm EDT

Geeklog Forums

Show article title is clickable


Status: offline

ofey

Forum User
Full Member
Registered: 03/18/05
Posts: 213
Location:Dublin, Ireland
I've set the title on articles to be a link to the full view of that article.
I like to add an 'alink' so that when the cursor goes over the title, users will see it is clickable. I'm not exactly suer how to do this. I had a go but no joy. Would the 'alink' go into the following code from 'storytext.thtml', which I already changed to make the title a link?

Text Formatted Code
<td align="left" bgcolor="#051535"><span class="articleFeature"><a href="{article_url}"><font color="#637293" size=1px>{story_title}</font></a></span></td>

 


I noticed when I added this piece of code above, the size of the font changed a little. Is there any way to keep the original?

Anyone have any ideas,

Ofey
Those who say it can't be done, are usually interrupted by others doing it.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The professional theme uses a class named "non-ul" here which, as the name implies, hides the underline. You could change that in style.css and remove the "text-decoration: none" rule from the "a:hover.non-ul" definition. Then hovering over the title would show the underline.

bye, Dirk
 Quote

Status: offline

ofey

Forum User
Full Member
Registered: 03/18/05
Posts: 213
Location:Dublin, Ireland
Hi Dirk,

I'm using 'Gameserver' layout.

I'd like the title to stay just as it was before I made it a link, the same color, font, size, etc. (no underline), only when a user hovers, it turns white.
Do you think that would be possible?

So basically is it possible to set the vlink, alink colours for just the story title, separate to all other links on the page.

Maybe this is more of an HTML prob than a GL one. I probably shouldn't be bothering people with this here.

My GL site
Those who say it can't be done, are usually interrupted by others doing it.
 Quote

Status: offline

drshakagee

Forum User
Full Member
Registered: 10/01/03
Posts: 231
You will have to edit a couple files to get it to work the way you want.

First add this to your style sheet:
Text Formatted Code

SPAN.articleFeature a {color: #637293; font-size:10px;}
SPAN.articleFeature a:hover {color: #ffffff;}

 

Then edit these files: archivestorytext.thtml, featuredstorytext.thtml, and storytext.thtml

To look like this:
Text Formatted Code

<!-- START STORYTEXT.HTML -->        
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                        <td width="9" background="{layout_url}/theme-images/gameserver-block-tl.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9" width="9"></td>
                                        <td height="9" background="{layout_url}/theme-images/gameserver-block-t.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9"></td>
                                        <td width="9" background="{layout_url}/theme-images/gameserver-block-tr.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9" width="9"></td>
                                </tr>
                                <tr>
                                        <td width="9" background="{layout_url}/theme-images/gameserver-block-l.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9" width="9"></td>
                                        <td width="100%">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="3">
                                                <tr>
                                                                <td align="left" bgcolor="#051535"><span class="articleFeature"><a href="{article_url}">{story_title}</a></span></td>
                                                                <td align="right" bgcolor="#051535">{email_icon} {print_icon} {pdf_icon} </td>
                                                        </tr>
                                                <tr>
                                                                <td colspan="2" bgcolor="#2e4166"><font color="#909090">{story_date}<br>{lang_contributed_by} {start_contributedby_anchortag}{contributedby_user}{end_contributedby_anchortag}</font>
                                                                        <table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="#2e4166">
                                                                                <tr>
                                                                                        <td>
                                                                                                <p>{story_anchortag_and_image}{story_introtext}</p>
                                                                                        </td>
                                                                                </tr>
                                                                        </table>
                                                                </td>
                                                        </tr>
                        <tr>
                                <td align="left" valigh="bottom" bgcolor="#051535" colspan="2">{readmore_link} <a href="{comments_url}">{comments_text}</a></td>
                        </tr>
                        <tr>
                                <td align="left" valigh="bottom" bgcolor="#051535">{recent_post_anchortag}<b>  [ {lang_views}: {story_hits} ]</b></td>
                                <td bgcolor="#051535" align="right"> {edit_link}
                                </td>
                        </tr>
                </table>
               
               
                                        </td>
                                        <td width="9" background="{layout_url}/theme-images/gameserver-block-r.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9" width="9"></td>
                                </tr>
                                <tr>
                                        <td width="9" background="{layout_url}/theme-images/gameserver-block-bl.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9" width="9"></td>
                                        <td height="9" background="{layout_url}/theme-images/gameserver-block-b.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9"></td>
                                        <td width="9" background="{layout_url}/theme-images/gameserver-block-br.gif"><img src="{layout_url}/theme-images/pixel.gif" height="9" width="9"></td>
                                </tr>
                        </table><br><!-- END STORYTEXT.HTML --><!-- START STORYBODYTEXT.HTML -->

 


If you just cut and copy that to your archivestorytext.thtml, featuredstorytext.thtml, and storytext.thtml then you should be in business.
Yes I am mental.
 Quote

Status: offline

ofey

Forum User
Full Member
Registered: 03/18/05
Posts: 213
Location:Dublin, Ireland
Thanks drshakagee,

Wink Almost there just a few little probs still. But I've definitely got the idea of how to do it.

On the featured article block, there's an extra blue line at the top with left and right corners. Also bottom two corners on there own. After going to the link I'd like it to go back to how it was originally. You won't see these probs on the site, I've put things back the way they were.

Thanks for your help, I'm definitely on the right road. I just need to play around with it.

I've an exam sat, so if I don't reply I'm not ignoring you.

Thanks again,

Shane

Those who say it can't be done, are usually interrupted by others doing it.
 Quote

Status: offline

ofey

Forum User
Full Member
Registered: 03/18/05
Posts: 213
Location:Dublin, Ireland
Thanks drshakagee,

That now does exactly what I want.

I had to use in the style.css the following:

SPAN.articleFeature a:link { color: #637293; font-weight: bold; font-size: 18px; font-family: Arial, Verdana, Helvetica, sans-serif }
SPAN.articleFeature a:visited{ color: #637293; font-weight: bold; font-size: 18px; font-family: Arial, Verdana, Helvetica, sans-serif }
SPAN.articleFeature a:hover { color: #ffffff; font-weight: bold; font-size: 18px; font-family: Arial, Verdana, Helvetica, sans-serif }

Also need:

&lt;b&gt;&lt;big&gt;{lang_todays_featured_article}&lt;/big&gt;&lt;/b&gt;

in featuredstorytext.thtml

Thanks for your help,

Shane
Those who say it can't be done, are usually interrupted by others doing it.
 Quote

TOR

Anonymous
curious
Sorry to bother you I have looked around the Forum but I cannot seem to find what I need.

the Article Headings are not showing on the front page, When you click on "read more" the headings are shown.

I looked around for "story_title" to see if I can change things but I just seem to be lost should I be looking in style css or is it a theme problem, the article headings show in the professional theme but not in the Dossier theme.
 Quote

TOR

Anonymous
embarrassed
javascript:emoticon(':banana:'Wink

I have found a problem,

In the professional theme the heading is surrounded by the following code.

<h1><a href="http://tor.id.au/article.php?story=20080915092438297" class="non-ul"> story heading </a></h1>

in the Dossier theme the heading is surrounded by the following code.

<h1><a href="http://tor.id.au/article.php?story=20080915092438297" class="non-ul" story heading</a></h1>

You will notice that the " > " is missing after class="non-ul" from the Dossier theme.

How do I fix this
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: TOR

the Article Headings are not showing on the front page, When you click on "read more" the headings are shown.


Depends on the theme you're using. If your theme is using the {start_storylink_anchortag} variable, there's a small bug: It's missing a closing '>'.

bye, Dirk
 Quote

TOR

Anonymous
so what do I do about it
 Quote

TOR

Anonymous
What is the name of the file that I need to edit?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Sorry, I guess I wasn't very clear: Click on the word "bug" above - it'll show you the patch.

bye, Dirk
 Quote

TOR

Anonymous
what do I do with the patch I clicked on the link and viewed the code do I save the code as a file and store it somewhere?
 Quote

TOR

Anonymous
I have downloaded the new lib-story.php and added it to my system but there is no difference
 Quote

TOR

Anonymous
Ok,

The heading are there but they have the same color as the background I will look for the color tag.

Sorry to bother you so much.
 Quote

TOR

Anonymous
Yes all is working well I changed the color in the style.css, All good
 Quote

All times are EDT. The time is now 01:50 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content