DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: Lightbringer on February 20, 2005, 03:37:01 AM



Title: Scripts from the Village
Post by: Lightbringer on February 20, 2005, 03:37:01 AM
A little unsure of where I should post this...

I am partly through a Library style bunch of scripts that tack onto a single nav in the village...

I will be converting it to module format at some point .. but for now it is just a link...

If people want, I will post the main part of the library here and then describe exactly what I hope to achieve...

There is  currently a section in there called 'Writer's Corner' where users can submit their own works...

One thing I would love to be able to do is change the <player> says to <player> scribes...

I am about to check the clan mod as I saw it happen there

***Update***
Code:
$customsay = httppost('customsay');
         if (httppostisset('customsay') && $customsay!=$claninfo['customsay']){
            $sql = "UPDATE " . db_prefix("clans") . " SET customsay='$customsay' WHERE clanid={$claninfo['clanid']}";
            db_query($sql);
            invalidatedatacache("clandata-{$claninfo['clanid']}");
            output("Updating custom say line`n");
            $claninfo['customsay']=stripslashes($customsay);
}
       

That is the snippet from Clan Editor that deals with the customsay stuff...

If anyone could help me specify a particular script I would be much obliged

~Cheers


Title: Re:Scripts from the Village
Post by: Sichae on February 20, 2005, 04:06:22 AM
In the viewcommentary part:
Code:
viewcommentary($section,$message="Interject your own commentary?",$limit=10,$talkline="says",$schema=false)
That part $talkline is what defines the customsay.

So, what you are going to want to do:
Code:
require_once("lib/commentary.php");
addcommentary();
viewcommentary("poets","Scribe Out Your Words",25,"scribes");
Then, you should get what you want.


Title: Re:Scripts from the Village
Post by: Lightbringer on February 20, 2005, 04:16:51 AM
Thanks again, Sichae...

I will go check it out now...just didn't seem right the other way lol


Title: Re:Scripts from the Village
Post by: Sichae on February 20, 2005, 04:17:47 AM
Then, if you want to have a special moderate, in the Moderate Commentary area:
In the install:
Code:
module_addhook("moderate");
Dohook:
Code:
case "moderate":
      $args['poets'] = "Poetry Area";
      break;

That will add a nav into your Moderate Commentary area, to section off your little comments ^_^


Title: Re:Scripts from the Village
Post by: Lightbringer on February 20, 2005, 04:32:54 AM
Excellent...will have to turn it into a module first lol

Will store that little piece of advice for future reference and will keep everyone informed on the progress...

Probably a little superfluous as there are a couple of Library mods anyways..but meh..Is a learning curve


Title: Re:Scripts from the Village
Post by: lonnyl on February 20, 2005, 05:43:38 AM
It may even pay to integrate your features and books into the current library, thus making only 1 library mod with a great deal more to offer.  Just a suggestion...


Title: Re:Scripts from the Village
Post by: Lightbringer on February 20, 2005, 05:52:27 AM
That is an excellent idea...Thank you for the suggestion...

It will take me a while to do..but I will sally forth and do so...

By the way..I will add the current work I have on it to my Shared Folder - everyone will then see what I am aiming towards and may be able to help a little on the integration...

Will also include a readme so that the specifics are covered...

*** WARNING - Will not be in module format... ***


Title: Re:Scripts from the Village
Post by: Dannic on February 20, 2005, 11:22:47 AM
You really should attempt to conform to the module format.  Makes it alot easier on others who may want to adjust it and not know alot about php.



Title: Re:Scripts from the Village
Post by: Lightbringer on February 23, 2005, 05:44:59 PM
You really should attempt to conform to the module format.  Makes it alot easier on others who may want to adjust it and not know alot about php.

I am already working on that...

I came straight from 9.7 to 9.8 pre-release .13

I am starting to get the module hook idea...It is fantastic but old habits die hard, I guess...

© 2018 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines