Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.3.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=42)
-   -   Mys v1.3.4 News System (http://www.mysidiaadoptables.com/forum/showthread.php?t=4392)

IntoRain 09-25-2014 08:20 AM

Ah, I see. I think the error is because the value is an integer and "None" was a string. Since the values can't be null, they don't need a default value, so I think it won't hurt to remove it
I hope it works! :)

edit: Added a step I forgot to the tutorial...

parayna 10-04-2014 03:20 PM

Heya ^_^ I am using this Mod (everything works great!) but do you know how I would change the time zone? I am in the UK, see, and it is set in a time zone 5 hours back (so like at 9 my time, it says it was posted at 4, for example)

Thank you ^_^ (I just want it UK time because I am from the UK XD) Also, if there is a way for it to automatically detect a user's time zone and change the times for them that would be great as well! (But I know little about coding so I have no idea how that would be possible...)

IntoRain 10-04-2014 04:10 PM

Quote:

Originally Posted by parayna (Post 31299)
Heya ^_^ I am using this Mod (everything works great!) but do you know how I would change the time zone? I am in the UK, see, and it is set in a time zone 5 hours back (so like at 9 my time, it says it was posted at 4, for example)

Thank you ^_^ (I just want it UK time because I am from the UK XD) Also, if there is a way for it to automatically detect a user's time zone and change the times for them that would be great as well! (But I know little about coding so I have no idea how that would be possible...)

Glad it's working for you!

You can set the DateTime thingy to your timezone, but I don't think it's possible to set it to the user's timezone. Perhaps with javascript, but I'm not really sure how

Check the file newsview.php inside admincp/view, and search for this part:

PHP Code:

public function create(){
    
$mysidia Registry::get("mysidia");
    
$document $this->document;
    
$document->setTitle("Create");
        
    if(
$mysidia->input->post("submit")){
        
$todayDate = new DateTime;

                
//add the following line:
        
$todayDate->setTimezone(new DateTimeZone('Europe/London'));

        
$date $todayDate->format('Y-m-d H:i:s');
//rest of the code here 

I assumed London, but here's the list of available timezones you can use: http://php.net/manual/en/timezones.php

I just used it for my country and it's 1 hour behind lol

parayna 10-04-2014 06:16 PM

OK! Thank you! ^_^ (And yeah, mine is the London one, good guess :P)

EDIT: Yay! It worked! Thanks! :D

parayna 10-07-2014 05:36 PM

Hi again! Sorry for the double post but I seem to have run into something... for some reason the CSS file part won't let me change it. And it is only working for one of my themes...

There aren't any errors popping up or anything, just the CSS of the news page doesn't work on my second theme (it's set to the default, blank one). I have put it into the same file I did to put it into my first theme, but it won't work.

I tried to change it as well (to better suit my first theme) but the images/colours won't change even when I remove the image link for the grey body image, and replace it with my own. Neither will the colours for the borders change when I add a different colour in... do you have any ideas as to what the problem could be? It's kinda confusing me... XD

IntoRain 10-07-2014 06:00 PM

Quote:

Originally Posted by parayna (Post 31355)
Hi again! Sorry for the double post but I seem to have run into something... for some reason the CSS file part won't let me change it. And it is only working for one of my themes...

There aren't any errors popping up or anything, just the CSS of the news page doesn't work on my second theme (it's set to the default, blank one). I have put it into the same file I did to put it into my first theme, but it won't work.

I tried to change it as well (to better suit my first theme) but the images/colours won't change even when I remove the image link for the grey body image, and replace it with my own. Neither will the colours for the borders change when I add a different colour in... do you have any ideas as to what the problem could be? It's kinda confusing me... XD

You might be editing the wrong .css file? The templates/main/media/style-city.css file is just for the main theme, other themes might be in different folders like templates/(other_theme)/.../file.css. Inspect your site's source code (right click > inspect/view code/or similar) to check which .css files it's using with that theme. Might be that xD

parayna 10-07-2014 06:08 PM

I made the themes myself and each theme uses a different style-city.css XD Unless you're not supposed to do that..? I just had trouble getting the bleedin' thing to work so I used the same name XD (just added different pictures for like the background and changed the colours in each one)

EDIT: Grr... got it working XD Finally, I managed to make the theme work with a differently named style-city.css. I changed it to style-red.css and refreshed the page and all of a sudden it decided to work! XD Thanks though ^_^

parayna 12-08-2014 10:28 AM

Hello, I know this hasn't been commented on for a while but do you know how to get the 'Send message to all users notifying about the existence of an update' button working? I think I recall you saying it doesn't work yet but I am thinking of trying to get it working..

Would it be possible to have it so that when that box is ticked it automatically updates the 'messages' database table? (Maybe not an email, just a PM on your site) As in, when you tick it every user on the site gets a PM from 'SYSTEM' or even just the admin...

Would that be possible? Sorry for bugging XD

~Parayna

IntoRain 12-08-2014 01:45 PM

Quote:

Originally Posted by parayna (Post 31619)
Hello, I know this hasn't been commented on for a while but do you know how to get the 'Send message to all users notifying about the existence of an update' button working? I think I recall you saying it doesn't work yet but I am thinking of trying to get it working..

Would it be possible to have it so that when that box is ticked it automatically updates the 'messages' database table? (Maybe not an email, just a PM on your site) As in, when you tick it every user on the site gets a PM from 'SYSTEM' or even just the admin...

Would that be possible? Sorry for bugging XD

~Parayna

Sorry, I didn't get back to this mod because my host started having problems and the loading times were too crazy to get anything done.

My idea was to send a PM to everyone in the site. The condition to send PM's is already there:

newview.php
PHP Code:

  else{
                            
            
$mysidia->db->insert("news",array("title" => $mysidia->input->post("newstitle"), "content" => $this->format($mysidia->input->post("pagecontent")), "user" => $mysidia->user->uid"date" => $date"posted" => "yes","allowcomment" => $allow));
            
                if(
$mysidia->input->post("allowmessage")){
                    
//$mysidia->db->insert("");
                
}
            } 

Next, inside the if, you'd need to retrieve all user ID's from the users table and use a loop to add the message to the messages table, one for each user (you might need the username instead of the userid, I don't remember which one the messages table uses x.x). This was my first idea, I wanted to do something prettier but I didn't come up with anything else lol

parayna 12-09-2014 12:23 PM

Thanks for replying ^_^ I might have a little go when I have more time XD

Thanks~


All times are GMT -5. The time now is 07:40 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.