DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: JollyGG on December 15, 2009, 12:04:36 AM



Title: Module Idea: Notepad
Post by: JollyGG on December 15, 2009, 12:04:36 AM
Ok, while playing on a site I had an idea, only problem is, I'm not sure how to achieve it.

 A notepad in your charstats. So when you say come across something in the forest, for example on the site I'm on now, you get like half recipes for potions you can make that you have to later combine (somehow??) and I thought it'd be a cool idea to have a notepad link in the char stats that would create a popup window, and you can enter text in, and hit save and it would either
A) Save the file itself in your bio for only you to see (like a link to the Saved Notes, then when you click on it, you get a page of links for like Saved1, Saved2, and clicking on one of those would give you your file [[maybe an extra option to name your files for organization]]),
or
B) save to your user_prefs in a continuous textarea

One way I saw doing A was trying to use parts of the LotGD Forum module, but I'm not sure yet.

Anyone have ideas/comments/suggestions/criticisms?


Title: Re: Module Idea: Notepad
Post by: Iori on December 15, 2009, 01:15:24 AM
Wouldn't sending a YOM to yourself achieve the same effect?


Title: Re: Module Idea: Notepad
Post by: Talisman on December 15, 2009, 01:33:06 AM
Wouldn't sending a YOM to yourself achieve the same effect?

YoMs would disappear based on content life. 


Title: Re: Module Idea: Notepad
Post by: JollyGG on December 15, 2009, 03:50:14 AM
Wouldn't sending a YOM to yourself achieve the same effect?

Yeah, thought of that, but...

YoMs would disappear based on content life. 

That's why I thought of the Notepad


Title: Re: Module Idea: Notepad
Post by: Rohen on December 15, 2009, 04:14:40 AM
We have a module that does exactly this. But only 17.78% of all players use it :)
They wished to store riddles in it without sending them a mail.


Title: Re: Module Idea: Notepad
Post by: Boris735 on December 15, 2009, 05:28:39 AM
I'm not greatly convinced of the merits of this as opposed to the user saving the data on their own computer and not consuming your resources, but this seems like a good excuse to get back into the coding vibe.  Here's a fairly simple implementation.

EDIT: Old attachment removed.  Newer version is in this post (http://dragonprime.net/index.php?topic=10795.msg97680#msg97680) below.


Title: Re: Module Idea: Notepad
Post by: JollyGG on December 15, 2009, 08:19:02 AM
That actually works very nicely. Thank you very much Boris :) I might expand on this when I figure out how, and I'll post up my edits to it. I might done right now that give the users a delete all notes button with a simple clear_module_pref


EDIT:
Question though, is the case save suppose to be
Code:
<?php case save?>
or
Code:
<?php case "save"?>


Title: Re: Module Idea: Notepad
Post by: Megan|SaraBeth on June 16, 2011, 08:51:45 AM
When I go into the module I cant click edit notes to add notes.  Is there a way to fix that?

Edit:  so the only problem is it doesnt work with the translator tool on.  that I dont know why


Title: Re: Module Idea: Notepad
Post by: Boris735 on June 17, 2011, 01:38:18 AM
Apologies for overlooking your much earlier response, JollyGG.  Yes, the case save should have been case "save".

Megan: Thank you for letting me know about that issue, and for diagnosing it as being due to the translator tool.  That was important, as I would not have thought to check that.  As a result, I've learned something new about how translate_inline() works and why not to use output() for anchor text.  Very handy!

A version including both fixes is attached.



Title: Re: Module Idea: Notepad
Post by: Megan|SaraBeth on June 22, 2011, 01:15:23 PM
Works wonders.  Thank you!  I didnt like the fact of having to turn off translator tool to use it


Title: Re: Module Idea: Notepad
Post by: JollyGG on June 22, 2011, 03:58:40 PM
No worries Boris :P I've had fun trying to fix things like that to work with the translator tool, I fixed Afkamm's Developers No Timeout module for that reason, lol


Title: Re: Module Idea: Notepad
Post by: TGTarheel on August 07, 2017, 06:49:58 PM
I'm not greatly convinced of the merits of this as opposed to the user saving the data on their own computer and not consuming your resources, but this seems like a good excuse to get back into the coding vibe.  Here's a fairly simple implementation.

EDIT: Old attachment removed.  Newer version is in this post (http://dragonprime.net/index.php?topic=10795.msg97680#msg97680) below.

Got this.  Thanks.  It is a nice touch.

© 2017 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