Code Authors: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Palbin
Newbie
Newbie



Joined: Nov 20, 2008
Posts: 15

PostPosted: Tue Oct 20, 2009 11:06 pm
Shop Purchases: CA Nuke Treasury USD · CA PHP Debugger · CA Gallery 2.0
Reply with quote

Guardian, I have done alot of work on nsn news 2.0. I need to send you what I have so far.
 
View user's profile Send private message Send e-mail
Guardian
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia

PostPosted: Wed Oct 21, 2009 6:31 am Reply with quote

Sure thing, you can sent it to webmaster AT the domain this site is at.

_________________
Nuke Reviews 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
montego
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 203

PostPosted: Sat Oct 24, 2009 2:08 pm
Shop Purchases: CA Nuke Treasury USD · CA PHP Debugger · CA Gallery 2.0
Reply with quote

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.
 
View user's profile Send private message Visit poster's website
Guardian
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia

PostPosted: Sat Oct 24, 2009 3:37 pm Reply with quote

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 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
montego
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 203

PostPosted: Sun Oct 25, 2009 1:52 am
Shop Purchases: CA Nuke Treasury USD · CA PHP Debugger · CA Gallery 2.0
Reply with quote

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. Sad
 
View user's profile Send private message Visit poster's website
Palbin
Newbie
Newbie



Joined: Nov 20, 2008
Posts: 15

PostPosted: Sun Oct 25, 2009 2:49 am
Shop Purchases: CA Nuke Treasury USD · CA PHP Debugger · CA Gallery 2.0
Reply with quote

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.
 
View user's profile Send private message Send e-mail
Guardian
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia

PostPosted: Sun Oct 25, 2009 8:29 am Reply with quote

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. Sad

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 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Guardian
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia

PostPosted: Sun Oct 25, 2009 8:31 am Reply with quote

@ Palbin, yes I got the zip file, I'll load it up on my test site - thanks!!

_________________
Nuke Reviews 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Guardian
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 4096
Location: Kezmarok, Slovakia

PostPosted: Sun Oct 25, 2009 9:05 am Reply with quote

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 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
montego
Site Admin
Site Admin



Joined: Jan 06, 2006
Posts: 203

PostPosted: Mon Oct 26, 2009 11:57 am
Shop Purchases: CA Nuke Treasury USD · CA PHP Debugger · CA Gallery 2.0
Reply with quote

Interesting... I had tried $sid as a global and it didn't work. Thank you for this!!!!
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT
 
Forums ©
linear-bunchlinear-bunch
linear-bunch