DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • February 20, 2019, 02:04:20 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Admin - Add Announcement  (Read 4463 times)
0 Members and 1 Guest are viewing this topic.
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« on: September 30, 2004, 04:52:49 PM »

This module will allow you to add announcements in the news. Maybe someone will find a use for it.
http://dragonprime.net/users/khatfield/admnews.zip
Logged
Tholgare
Guest
« Reply #1 on: September 30, 2004, 05:03:46 PM »

lol, I was working on the same thing.  Looks like you beat me to it, though.
Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #2 on: September 30, 2004, 07:56:40 PM »

I apologize Tholgare. Your welcome to use/change mine as you like.
Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #3 on: November 19, 2005, 12:18:04 PM »

Updated to version 1.1.


Same download link.
Logged
edorian
Guest
« Reply #4 on: November 20, 2005, 04:09:48 AM »

Hi,

i was just wondering about your "requires"

require_once("lib/http.php");
require_once("lib/addnews.php");

will be required before and you don't use any function of

require_once("lib/sanitize.php");

also

global $SCRIPT_NAME;

makes no sense to me .. you don't use that variable ..

`0 isn't a colour code you should use the way you do


and i'm not sure if there is really no need to require the "lib/villagenav.php" if you use the villagenav(); function ...

in the "run" function you don't need to

 return($args);

as "args" is not set anyway... (and the _run doesn't need a return value)

I didn't install it .. just was looking over... sorry if i was wrong with something...


and that

switch($op){
        case "":
        page_header("News Additions");
   villagenav();
   page_footer();
}
   if ($op == "confirm"){
   page_header("News Additions");
   villagenav();
   page_footer();
   }
(i didn't paste the other code lines)


could be replaced by


page_header("News Additions");
if($op=="")
{
//code
}
else if($op=="confirm")
{
//code
}
villagenav();
page_footer();




and yes.. i'm working on my english ...
« Last Edit: November 20, 2005, 04:15:41 AM by edorian » Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #5 on: November 20, 2005, 04:05:04 PM »

Quote
require_once("lib/sanitize.php");

makes no sense to me .. you don't use that variable ..

`0 isn't a colour code you should use the way you do


and i'm not sure if there is really no need to require the "lib/villagenav.php" if you use the villagenav(); function ...

in the "run" function you don't need to

return($args);

as "args" is not set anyway... (and the _run doesn't need a return value)

Yeah... hmm.. I really was not even going to reply...

But sanitize is used with stripslashes.

Why not use `0? Its a color code.

villagenav / Has to be called if your going to call the function.

return($args); - Your right, this may not need to be here but was in by habit.

Honestly, please don't criticize without researching first.

« Last Edit: November 20, 2005, 05:11:21 PM by Arune » Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #6 on: November 20, 2005, 04:08:29 PM »

Line 58, please change to:
Code:
addnews("`5\"`6%s`5\" %s`5 announces."
,stripslashes(httppost('addone')),$session['user']['name']);
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #7 on: November 20, 2005, 04:13:40 PM »

Updated / Fixed v1.2


This was fixed in my version dunno wtf happened. Although, my fix wasn't as good as yours.

Thanks Sichae
« Last Edit: November 20, 2005, 04:14:14 PM by Arune » Logged
edorian
Guest
« Reply #8 on: November 22, 2005, 04:29:43 AM »

stripslashes is an PHP Funktion .. that has NOTHING to do with lotgd code ....

stripslashes_array is an lotgd function ...


`0 closes colour tags and should not be used that way ...


And there is no need to be that arrogant (or pissed of)  .. if you don't want talk about mistakes you perhaps made (i marked the lines i was unsure about)  .. just say it.

Maybe just the time you spend voting on my Karma with just considering for a second that no one is perfekt and i that i was just tring to help ... ..


« Last Edit: November 22, 2005, 04:42:32 AM by edorian » Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #9 on: November 22, 2005, 07:09:47 AM »

Hmm,
 I never did vote on your Karma so I apologize that you think that.

Besides that the use of me calling sanitize was for me to use the stripslashes function at one point and I never did. The only thing I was pointing out is that maybe there is a possibility I planned to further this module and had taken the steps in order to do so. I just have not executed the rest of the additions that I planned to make.

I don't mind criticism. I actually encourage it. I just couldn't believe you picked apart my module out of all of the ones on this board to find questionable things without asking first whether I planned to implement changes to it.

I appreciate your help but this module is not completed and therefore will have changes made when my time allows.

As far as `0 in the color coding... I use it out of absolute habit in order to change to white. I'm sorry that bothers you.

As for the rest, it maybe just laziness. This module was the first module I converted to 0.9.8 as a test. So its not perfect and I haven't taken the time to correct it.
« Last Edit: November 22, 2005, 07:11:23 AM by Arune » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
48 Guests, 1 User
Raeshi
Home Forums News Downloads Login Register Advanced Search