Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Reply
 
Thread Tools Display Modes
  #11  
Old 02-24-2014, 10:37 AM
Vaporman87 Vaporman87 is offline
Member
 
Join Date: Feb 2014
Posts: 32
Gender: Male
Credits: 1,838
Vaporman87 is on a distinguished road
Default

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));
I added my subfolder name, "DigiChars", before the " /news/view/ " and " /profile/view/ " text.
Reply With Quote
  #12  
Old 02-25-2014, 09:55 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 15,197
IntoRain is on a distinguished road
Default

Thank you! I will add a note to the first post!
__________________


asp.net stole my soul.
Reply With Quote
  #13  
Old 02-26-2014, 09:36 PM
Missy Master's Avatar
Missy Master Missy Master is offline
*~Pet-Sim Com!~*
 
Join Date: Jan 2010
Posts: 452
Gender: Unknown/Other
Credits: 15,733
Missy Master is an unknown quantity at this point
Default

This looks really good! I cant wait to try this out --- thanks for sharing this with us! :)
__________________
Reply With Quote
  #14  
Old 03-03-2014, 07:55 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 15,197
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by Annatar View Post
This looks really good! I cant wait to try this out --- thanks for sharing this with us! :)
Thank you for the support! ^^
__________________


asp.net stole my soul.
Reply With Quote
  #15  
Old 03-05-2014, 02:21 AM
Kesstryl's Avatar
Kesstryl Kesstryl is offline
Member
 
Join Date: Feb 2012
Posts: 121
Gender: Female
Credits: 6,678
Kesstryl is on a distinguished road
Default

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.
Reply With Quote
  #16  
Old 03-07-2014, 07:01 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 997
Gender: Male
Credits: 48,467
Abronsyth is on a distinguished road
Default

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?
Reply With Quote
  #17  
Old 03-09-2014, 08:16 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 15,197
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by Kesstryl View Post
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.
Thank you! Hope it works well for you! ^^ OOP is one of those concepts that will make so much sense once it clicks xD

Quote:
Originally Posted by Abronsyth View Post
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?
Yay glad it worked for you! ^^ THank you for the input!
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.
Reply With Quote
  #18  
Old 09-24-2014, 06:26 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 997
Gender: Male
Credits: 48,467
Abronsyth is on a distinguished road
Default

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?
Reply With Quote
  #19  
Old 09-24-2014, 07:10 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 15,197
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by Abronsyth View Post
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?
Did you write "None" instead of selecting 'None' from the list? If it's not that, you can try running it directly and removing the default part:

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
This is by clicking on the "SQL" tab. Like here: http://i.imgur.com/VGRaF82.png
__________________


asp.net stole my soul.
Reply With Quote
  #20  
Old 09-25-2014, 04:37 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 997
Gender: Male
Credits: 48,467
Abronsyth is on a distinguished road
Default

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 :)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
News Feed Yuki Night Suggestions and Feature Requests 0 01-30-2013 01:04 AM
Implementing A News Feed Yuki Night Questions and Supports 0 01-29-2013 06: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


All times are GMT -5. The time now is 05:45 PM.

Currently Active Users: 240 (0 members and 240 guests)
Threads: 3,985, Posts: 31,558, Members: 15,635
Welcome to our newest members, Isabccombe.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636