change the "Posted by" link to a "News by this author" link, everywhere in the News module

I don't know if this would appeal to anyone, but I wanted to over use the "news by this author" links, and I didn't like the format of the "Posted by" links on the news module, if you change line 504 in /modules/news/class/class.newsstory.php to
$story['poster'] = "<a href='".XOOPS_URL."/modules/news/newsbythisauthor.php?uid=".$this->uid()."'>".$story['poster']."</a>";

Everywhere you used to have a link that would send your visitors to the authors user info, now sends them to the "News by this author" link. - again, it was handy for me, might not be for you.

This works well for me on 1.3, I don't see why it wouldn't work on all, the line number just might be off though, on different versions.

My example, and shameless plug, would behttp://www.knewstalk.com where I wanted the authors names to be links to the news by this author page.

Re: Who still have problems with News 1.3.1 RC2 ?

nevermind I fixed it - flushed my templates_c folder, then upped it to news version 1.3.1.

but definately a word to the wise - the submit.php file is a lot different from news 1.3x to the XOOPS 2.0.93-2.0.10 patch files.

Re: Who still have problems with News 1.3.1 RC2 ?

I have a weird one for you:

I was running XOOPS version 2.0.93, *I then upgraded to 2.0.10 - finally, I upgraded the news module - to 1.3.

that went fine for a while, until I applied the autologin hack.

So I though I was having version issues, look in my admin control panel and saw that it was still registering as version 2.0.93. I removed the autologin hack, and went back and re-did the upgrade to 2.0.1 - I had done all the procedures correct the first time, I just must not have noticed the old version in the control panel.

When I did this I noticed that the submit.php file is 3 times smaller than the news 1.3 version. - a big question mark there?

I applied the autologin hack again, and all was well. Until I tried to edit a News story from the front-page; the submit.php?op=edit&storyid=xxx link takes me to what looks more like a submit new page. The forms are all empty, even though the link says I'm editing that story number.

Everything else works fine, and if I edit the story in the admin control panel it works fine.

Any help would be greatly appreciated, I really think it has something to do with that upgrade 2.0.93-to-2.0.1 "submit.php" file being so much smaller than your news 1.3 version, but I haven't yet compared the two.
I did try to put your submit.php version back in the /modules/news/ directory, but the php dies at "Edit News Story" or something.

Change entire presentation elements on the "News" module - any version

Using the Smarty variables and if/else statements, you can edit your news_item.html file (in Templates Menu) to exclude elements, or completely change the look of the news item based on who posted the story.

for my K-News Station site, I created a user named KNEWS, and if I post the story as that user (or, I just change it in 1.3) the entire "Posted By" line gets dropped. - here is the only thing I changed - other than creating the user:

<{if $story.author_name == "KNEWS"}>
td class="itemHead">
span class="itemTitle"><{$story.title}></span>
td class="itemInfo">
$story.poster != ''}><span class="itemPoster"><{$lang_postedby}> <{$story.poster}></span><{/if}>
span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span><{$news_by_the_same_author_link}>

adding the:
<{if $story.author_name == "KNEWS"}>

statement made that entire loop disappear when the user who posted the story was "KNEWS"

- I don't know template editing very well, so it looks a little weird without it completely, but you can see how only things posted by "KNEWS" will have that element dropped.

So imagine using two or three different users setup, with a different presentation for each one.

edit: I then used the /if loop to tie in a second itemHead (itemHead2) to the css, then added that statement to the css, - to add the buffer I wanted.

Re: Empty space between text and pics - NEWS STORIES ONLY

ehh, you know in review - this really isn't a solution, as it can add the margin= value to every img tag in the html, so you can get inconsistent layouts with my fix.

If your theme doesn't use images to border, or for the design; this may work ok for you though. just keep in mind that it adds the margin tag to every img on the page. - or I'm doing it wrong.

A positive review of a good webhost

I've had a very good experience with ixwebhosting, they offer linux or windows based hosting plans.

the MySQL server is seperate from your site server, so the only problems I've ever had, was when a dns problem occured on their side, and my MySQL server was unavailable for 1 hour. The tech support responded quickly, and I had a reply within 15 minutes.

they are very phone-friendly as well, this was a big thing with me, my last host was completely unavailable when I needed that fast-phone-service.

ixwebhosting is a great site for xoopsers.

They also offer a lot of different level plans, I'm running two "gold plans" right now to host 12 XOOPS sites. they offer 6 domains, 3 free dns registers, SSL, (*free) SSL, unlimited storage, 30GB per month, unlimited emails, auto responders, full SQL support: (ok here's a copy/paste of their plan from their site)

Dedicated IPs 6
Free Domains 3
Disk Space Unlim.
SSL Domains 6
Data Transfer 30GB
*Shared SSL YES
Domains 6
PostgreSQL 6
Sub Domains 30
Email Accounts no limit
WebMail YES
FTP Users no limit
Setup Fee $20
Domain Aliases 6

Billing Options - Discounts Available!
· Quarterly, 6-Months: No Discounts
· Annual: FREE Setup
· 2-year: 10% Discount + FREE Setup

and I'm not just advertising (though I would get paid if anyone clicked my linkie....)

Resized Image

Re: Template hacking for News, first attemp

You know, I didn't even think about what jdseymour was saying, I guess I don't go to the base news module from my top page-new module, I only use the "read more" links, and the topics navigation can be included in news 1.3.

sorry if I only frustrated.

Re: attachment .swf files on news 1.3 ?

If you look at the install of news 1.3, you will see that you just need to add the mime time for .swf, I had to do this in order to upload mp3 files.

do a XOOPS search for "news 1.3" and "mime"

doh, I couldn't find it that way either, ok edit:

read the class.mimetype.php file in ../news/class

Re: Template hacking for News, first attemp

my understanding would be that if you set the News module as your home page, then in the blocks you only want to display on the home page; select "top page" as the "display in" section. You should then only see them on the home page, not the module. - works 4 me.

Re: Header hack, why a hack?

Thanks so much for your attention guys, I have a lot of ideas for xoops, and I hope to be able to contribute in any way that I can.

(1) 2 »


Who's Online

62 user(s) are online (39 user(s) are browsing Support Forums)

Members: 0

Guests: 62



Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits