| Author |
Message |
Palbin
Newbie


Joined: Nov 20, 2008
Posts: 15
|
Guardian, I have done alot of work on nsn news 2.0. I need to send you what I have so far. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia
|
Posted:
Wed Oct 21, 2009 6:31 am
|
|
Sure thing, you can sent it to webmaster AT the domain this site is at. |
_________________ Nuke Reviews |
|
|
 |
montego
Site Admin


Joined: Jan 06, 2006
Posts: 203
|
Yeah, G-man, had to dig deeper into the code for a site I am creating while working on the theme... wow, what a mess FB has left us. I know that I had already fixed a few things awhile back, but now I remember the mess. I can't even believe it does not pass the article $sid in the function call! Even something as simple as that, which you would need, I would think, to fashion any kind of link to an article, including those little social bookmarks you have.
Why I am ever surprised about this original code is beyond me. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia
|
Posted:
Sat Oct 24, 2009 3:37 pm
|
|
Yeah, I came across the same thing. In using my icons in the modules index file, I wanted to try removing my three dynamic icons and replacing them with something like
| Code: |
$morelink = The article $title has had $count page views, $c_count comments and $score votes.
|
So that I could form a A HREF link around the whole line using $title as the anchor text.
The problem is, due to the line length that it takes up, it pushes my SB icons completely out of articles white background and makes a complete mess and using a linebreak makes it even worse.
Of course, I can change the function themeindex() to fix that but that function resides in the themes theme.php file and without some hefty surgery, it doesn't pass the variables that I need ($score amongst others) from News/index.php to to the theme.
In and of itself, thats not too much drama but it means I would have to change every single theme if I was to allow user theme selection - sigh!
I did try to create a link on the articles title text before, during my last foray into News but as you noticed, $sid isn't passed which makes it impossible without modifying the core code. |
_________________ Nuke Reviews |
|
|
 |
montego
Site Admin


Joined: Jan 06, 2006
Posts: 203
|
I was able to do a preg_match() function on the $morelink variable to pull off the sid value, if it existed. But, unfortunately, unless one has a comment or extended text... no morelink.  |
| |
|
|
 |
Palbin
Newbie


Joined: Nov 20, 2008
Posts: 15
|
Guardian, I sent you an email. Let me know if you got it because I just setup my email again, and it was giving me a hard time. |
| |
|
|
 |
Guardian
Site Admin


Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia
|
Posted:
Sun Oct 25, 2009 8:29 am
|
|
| montego wrote: |
I was able to do a preg_match() function on the $morelink variable to pull off the sid value, if it existed. But, unfortunately, unless one has a comment or extended text... no morelink.  |
Yes, thats why I think we should be building the anchor text dynamically and not the actual link AND text.
If there is no extended text (ReadMore..) the only link you get is 'comment?'.
If you wanted to 'rate' the article you have to click 'Comment' which seems a bit backwards to me.
Unless the article has been rated previously, there is no 'rate' link.
I'm actually beginning wonder now if it isn't better the completely re-write the News module, remove the related code in mainfile and make News a true module by getting rid of in_home related code and instead having the news articles displayed via a block.
Maybe use in_home to determine which blocks are shown on the home page, rather than which module............... |
_________________ Nuke Reviews |
|
|
 |
Guardian
Site Admin


Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia
|
Posted:
Sun Oct 25, 2009 8:31 am
|
|
@ Palbin, yes I got the zip file, I'll load it up on my test site - thanks!! |
_________________ Nuke Reviews |
|
|
 |
Guardian
Site Admin


Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia
|
Posted:
Sun Oct 25, 2009 9:05 am
|
|
Actually it is easier than I thought....
@ M In the themes theme.php just add $story_link to the global vars for the function themeindex
Then it's just a matter of changing $title to
$story_link$title</a> |
_________________ Nuke Reviews |
|
|
 |
montego
Site Admin


Joined: Jan 06, 2006
Posts: 203
|
Interesting... I had tried $sid as a global and it didn't work. Thank you for this!!!! |
| |
|
|
 |
|
|