Hello

July 30, 2010, 05:19:09 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
What sNews Is: - sNews is a simple, basic, customizable CMS tool suitable for developers with beginner-to-advanced PHP skills. It is also useful to have a good working knowledge of how to work with, set up and manage MySQL databases. sNews is not - geared towards the end-user who knows little or nothing about building and developing PHP-MySQL based websites.
News: Try sNews 1.7 DEMO
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: [MOD] Clickable Article Titles  (Read 6193 times)
bakercad
Administrator
ULTIMATE member
******

Karma: 105
Posts: 1654



WWW
« on: May 23, 2007, 05:41:13 PM »

Same idea as here for 1.5.xx

UPDATED: Made this easier
UPDATED - August 13, 2007: updated to work when pages are specified during pagination.

Makes article title clickable only at home or within a category.  If you're viewing the article, it will NOT be clickable, since you're already there.

In the center() function:
find this: note the red text
Quote
if ($r['displaytitle'] == 'YES') {echo '<h2>'.(strlen($text) > $shorten ? $link.$category.'/'.$r['seftitle'].'/" title="'.$title.'">'.$title.'</a>' : $title).'</h2>';}
Replace the red text above with the blue text below:
UPDATE - August 13, 2007 add the purple
Quote
if ($r['displaytitle'] == 'YES') {echo '<h2>'.( !$article  || $currentPage ? $link.$category.'/'.$r['seftitle'].'/" title="'.$title.'">'.$title.'</a>' : $title).'</h2>';}
« Last Edit: August 21, 2007, 11:53:06 PM by Phil Martin » Logged

piXelatedEmpire
MIA
Thread Moderator
ULTIMATE member
*****

Karma: 37
Posts: 1456


currently MIA


« Reply #1 on: May 24, 2007, 01:41:48 AM »

I was just playing with this on my install!  Cheers bobby :cool:
Logged

my apologies to the sNews crew, but I will be MIA for the forseeable future
philmoz
High flyer
Administrator
ULTIMATE member
******

Karma: 150
Posts: 1836



WWW
« Reply #2 on: May 24, 2007, 02:15:20 PM »

so, this makes title clickable in a multiple display (home or category), even if article has no [break] in it?
yes?
Logged

Take offs are optional, landings are mandatory, unless you get into space, then you have other issues.
bakercad
Administrator
ULTIMATE member
******

Karma: 105
Posts: 1654



WWW
« Reply #3 on: May 24, 2007, 07:20:18 PM »

Quote from: philmoz
so, this makes title clickable in a multiple display (home or category), even if article has no [break] in it?
yes?
That is correct sir.
Logged

Olle Axelsson
Jr. Member
**

Karma: 3
Posts: 76



WWW
« Reply #4 on: August 07, 2007, 09:57:36 AM »

I noticed today that my article titles only are clickable on the first page of my so far 6 pages in home category. How can I make all article titles clickable in home category, no matter what page number?
Logged

Eatlon.com
Free XHTML/CSS templates and a bucket of webdesign resources
Olle Axelsson
Jr. Member
**

Karma: 3
Posts: 76



WWW
« Reply #5 on: August 12, 2007, 10:53:24 AM »

Peep!
Logged

Eatlon.com
Free XHTML/CSS templates and a bucket of webdesign resources
bakercad
Administrator
ULTIMATE member
******

Karma: 105
Posts: 1654



WWW
« Reply #6 on: August 13, 2007, 02:45:49 PM »

done....see the purple in the first post.  and thanks for pointing that out. Smiley
Logged

Olle Axelsson
Jr. Member
**

Karma: 3
Posts: 76



WWW
« Reply #7 on: August 13, 2007, 05:31:17 PM »

Superb, Bob! Cheesy
Logged

Eatlon.com
Free XHTML/CSS templates and a bucket of webdesign resources
Frankc
Newbie
*

Karma: 0
Posts: 17


« Reply #8 on: August 14, 2007, 01:58:19 AM »

This mod don't work everywhere.

The titles in the PAGES is not clickable and if you go to a page via the Article Menu links it is also not clickable.

Same also apply for a mod to display list of articles in a specific category.  

If you visit an article via Category Menu and/or next / back etc it is clickable but not if you visit the same page via other link.

I actually don't care about whether it is clickable or not but after it become clickable with this mod I was able to customise the title a bit by adding


 direct after the

Via above mentioned links to the article it is no longer clickable AND the slight layout modification disapear so I guess that it is strlen out when visited via other than normal llinks.
Logged
Olle Axelsson
Jr. Member
**

Karma: 3
Posts: 76



WWW
« Reply #9 on: August 14, 2007, 02:51:15 AM »

Quote from: bakercad
Makes article title clickable only at home or within a category.  If you're viewing the article, it will NOT be clickable, since you're already there.
Logged

Eatlon.com
Free XHTML/CSS templates and a bucket of webdesign resources
Keyrocks
Administrator
ULTIMATE member
******

Karma: 411
Posts: 5452


Semantically Challenged


WWW
« Reply #10 on: August 14, 2007, 02:55:53 AM »

This mod works just fine as intended. Smiley
Logged

Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Frankc
Newbie
*

Karma: 0
Posts: 17


« Reply #11 on: August 14, 2007, 03:25:57 AM »

Ok thanks

Is there a way to add the line and space under article titles everywhere?

http://www.demo-website.co.za/general/

You will notice that the Article title are clickable and there is a line and space under it.

http://www.demo-website.co.za/general/business/

The article title is no longer clickable and the line and space under it also disappeared.

I added the


 AFTER the so if the title is clickable it is ok, but if not, the format will also not be changed. I cannot figure out where to place the formating code for non-clickable article titles and would appreciate some help please.
Logged
Keyrocks
Administrator
ULTIMATE member
******

Karma: 411
Posts: 5452


Semantically Challenged


WWW
« Reply #12 on: August 14, 2007, 02:37:25 PM »

Quote from: Frankc
Ok thanks
Is there a way to add the line and space under article titles everywhere?
http://www.demo-website.co.za/general/
You will notice that the Article title are clickable and there is a line and space under it.
http://www.demo-website.co.za/general/business/
The article title is no longer clickable and the line and space under it also disappeared.
I added the


 AFTER the so if the title is clickable it is ok, but if not, the format will also not be changed. I cannot figure out where to place the formating code for non-clickable article titles and would appreciate some help please.
This is a CSS styling issue.
The space and line under the title... when it is an active link... is a styling issue. In your css stylesheet, the appearance of all links in your site will be controlled by the style declarations for a which... in the default sNews 1.6 Minimal Template (style.css file) is:
Quote
a { color: #E23300; background: inherit; }
... and the above will automatically apply the underline to all links. You can remove that auto-generated line by adding the following to the styling:
Quote
a { color: #E23300; background: inherit; text-decoration: none; }
With this line removed, you can then modify the styling applied to all the article titles:
Quote
h2 { border-bottom: 1px solid #eee; margin: 0 0 10px; padding: 0 0 3px;  }
Notice that it has a solid border-bottom of 1px and it is #eee in color. If this is fine with you, leave it as it is. If not, you can change it.
Logged

Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
jennaberry
Newbie
*

Karma: 0
Posts: 12


« Reply #13 on: August 26, 2007, 06:40:54 PM »

hi, sorry im a bit confused.. where exactly do i put this? :

if ($r['displaytitle'] == 'YES') {echo '<h2>'.( !$article  || $currentPage ? $link.$category.'/'.$r['seftitle'].'/" title="'.$title.'">'.$title.'</a>' : $title).'</h2>';}
Logged
Keyrocks
Administrator
ULTIMATE member
******

Karma: 411
Posts: 5452


Semantically Challenged


WWW
« Reply #14 on: August 27, 2007, 12:52:46 AM »

Please refer to the post at the top of this topic. Bakercad's instructions are pretty clear. You need to use the search function in your code editor to locate the noted string, and make your change within it.  Wink
Logged

Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU
Pages: [1] 2
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!