#11
|
|||
|
|||
The only thing I noticed is that if you have your site in a subfolder, you need to go in and change the following code in the /view/newsview.php file:
Code:
$newsObj = new News($news); $index++; $newsField = new Fieldset("news$index"); $comments = $newsObj->getCommentNumber(); $newsField->add(new Comment("<span class='date'>Date: {$newsObj->getDate()}</span><br>",FALSE)); $newsField->add(new Comment("<span class='title'>{$newsObj->getTitle()}</span>",FALSE)); $newsField->add(new Comment("<span class='author'>by <a href='/profile/view/{$newsObj->getUserObject()->getUsername()}' target='_blank'>{$newsObj->getUserObject()->getUsername()}</a></span>",FALSE)); $newsField->add(new Comment("<span class='comment'><a href='/news/view/{$newsObj->getID()}'>Comments({$comments})</a></span><br>",FALSE)); $newsField->add(new Comment("<span class='content'><img class='authorimg' src='{$newsObj->getUserObject()->getprofile()->getavatar()}'>{$newsObj->getContent()}</span>",FALSE)); |
#12
|
||||
|
||||
Thank you! I will add a note to the first post!
__________________
asp.net stole my soul. |
#13
|
||||
|
||||
This looks really good! I cant wait to try this out --- thanks for sharing this with us! :)
|
#14
|
||||
|
||||
Thank you for the support! ^^
__________________
asp.net stole my soul. |
#15
|
||||
|
||||
Nice mod, will definitely use this once I start working on my site. Right now I've been diggin g deep into learning MVC, OOP, and PDO before I even touch Mysidia.
|
#16
|
||||
|
||||
Just created and added everything and it is functioning perfectly! I have to fix up the formatting a little bit so it works more neatly with the theme, but it's awesome so far!
How do you think one should go about making it so that a news alert appears at the top of the page until the member visits the news page? So each time a new news post is added members are alerted when they logon?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#17
|
||||
|
||||
Quote:
Quote:
I was thinking of sending a new message to users to alert them of a new news, but I kinda got lazy and didn't do it lol I guess it would work exactly like the messages system that alerts users when they get a new message. Maybe another table that contains all users and a field that says if they have been to the news page ever since a new news was posted. So when posting a news, all fields would reset to "unread" for all users and while it was unread, a message would appear somewhere in the site
__________________
asp.net stole my soul. |
#18
|
||||
|
||||
Okay, I'm having this error:
CREATE TABLE `newscomments` ( `id` INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `newsID` INT( 5 ) NOT NULL DEFAULT 'None', `userID` INT( 5 ) NOT NULL DEFAULT 'None', `comment` VARCHAR( 300 ) NULL DEFAULT NULL , `date` VARCHAR( 30 ) NULL DEFAULT NULL ) ENGINE = MYISAM MySQL said: Documentation #1067 - Invalid default value for 'newsID' Any ideas?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#19
|
||||
|
||||
Quote:
Code:
CREATE TABLE `[your_prefix_here]_newscomments` ( `id` INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `newsID` INT( 5 ) NOT NULL, `userID` INT( 5 ) NOT NULL, `comment` VARCHAR( 300 ) NULL DEFAULT NULL , `date` VARCHAR( 30 ) NULL DEFAULT NULL ) ENGINE = MYISAM
__________________
asp.net stole my soul. |
#20
|
||||
|
||||
The phpMyAdmin that my host is using seems to be a bit dated, so it doesn't actually have a drop-down for most of the parts. I'll go through and run it directly to see if that'll work.
Thank you :)
__________________
My Mods Site (1.3.4, 2020 Mods) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
News Feed | Yuki Night | Suggestions and Feature Requests | 0 | 01-30-2013 12:04 AM |
Implementing A News Feed | Yuki Night | Questions and Supports | 0 | 01-29-2013 05:25 PM |
News feed script? | Aasixx | Staff Central | 3 | 06-18-2012 03:06 AM |
Adopts News | Bloodrun | Addons/Mods Graveyard | 71 | 06-18-2009 02:13 PM |
News | 12345 | Questions and Supports | 9 | 05-10-2009 03:13 PM |
What's New? |
What's Hot? |
What's Popular? |