Add (<CANTR CHARDESC>) Button!

Out-of-character discussion forum for players of Cantr II to discuss new ideas for the development of the Cantr II game.

Moderators: Public Relations Department, Players Department, Programming Department, Game Mechanics (RD)

User avatar
TheTheorist
Posts: 153
Joined: Fri Jul 30, 2004 11:16 am
Location: Nottingham UK
Contact:

Add (<CANTR CHARDESC>) Button!

Postby TheTheorist » Tue Mar 21, 2006 10:32 am

I'm back, and having new Chars again made me really think this was a good idea! I'm just lazy ;)

Preview here: http://www.originmedia.net/script.htm

Code here (Unstyled unlike example for easy merge into script!):

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Cantr II</title>
  <STYLE TYPE="text/css">
  <!--
    A:link {text-decoration: none}
    A:visited {text-decoration: none}
    A:active {text-decoration: none}
  -->
  </STYLE>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function addtext() {
   var newtext = " (<CANTR CHARDESC>)";
   document.form.name.value += newtext;
}
</script>
</head>
<body>
<TABLE WIDTH=700><TR HEIGHT=20><TD COLSPAN=0 BGCOLOR=#004400></TD></TR><TR><TD COLSPAN=0 BGCOLOR=#008800 ALIGN=center><FONT FACE="Verdana, Arial, Helvetica" SIZE=3><B>CHANGE NAME</B></TD></TR><TR HEIGHT=20><TD COLSPAN=0 BGCOLOR=#004400></TD></TR></TABLE></CENTER><TABLE WIDTH=700><TR><TD>Instead of the short description of this character on the events list or on the people overview page, you can enter a name by which you know this person:<BR><FORM Name="form" METHOD=post ACTION="index.php?s=71735102&page=name"><INPUT TYPE=hidden NAME=id VALUE=XXXXX><INPUT TYPE=hidden NAME=type VALUE=1><INPUT TYPE=hidden NAME=next VALUE=char.events>Name: <INPUT TYPE=text SIZE=54 VALUE="" NAME=name> <INPUT TYPE=submit CLASS=button_charmenu VALUE="Change"><input type="button" value="Add (<CANTR CHARDESC>)" onClick="addtext();"></FORM><BR>If you want to give a character a name, but would still like to get the description, you can include<BR><BR>&lt;CANTR CHARDESC&gt;<BR><BR>For example:<br><i>John Hopkins (&lt;CANTR CHARDESC&gt;)</i><br>could look like<br><i>John Hopkins (a man in his twenties).</i><BR></TD></TR><TR><TD ALIGN=center><BR><BR><A HREF="index.php?s=71735102&page=char.people">Go back</A></TD></TR></TABLE>
</body>
</html>


I just copied and pasted the result page source, so it will need a little bit of work to integrate. Only real change is that the form needs labeling "form" and the script and button code needs adding. That should be all!

The Theorist ;)
"The only way to predict the future... is to invent it" -Alan Kay
olaf
Posts: 60
Joined: Fri Jun 24, 2005 4:54 am

Postby olaf » Tue Mar 21, 2006 10:42 am

Or at least please make it so when you edit one you've already done, it doesn't lose it...
User avatar
TheTheorist
Posts: 153
Joined: Fri Jul 30, 2004 11:16 am
Location: Nottingham UK
Contact:

Postby TheTheorist » Tue Mar 21, 2006 10:46 am

I could have automated it, so that whenever the box is edited, it automatically bolts the bit on.

I would have thought most people add the CHARDESC, but I left it as an option as it was!

Feedback appreciated. I'll do an automated script if need be!
"The only way to predict the future... is to invent it" -Alan Kay
User avatar
Jos Elkink
Founder Emeritus
Posts: 5711
Joined: Mon Jul 14, 2003 1:17 pm
Location: Dublin, Ireland
Contact:

Postby Jos Elkink » Tue Mar 21, 2006 10:55 am

I like it :)

Not if it were to be automated, though.

And the button should describe what happens, rather than using the code in its name ;) ...

But nice idea.
User avatar
TheTheorist
Posts: 153
Joined: Fri Jul 30, 2004 11:16 am
Location: Nottingham UK
Contact:

Postby TheTheorist » Tue Mar 21, 2006 11:10 am

http://www.originmedia.net/script2.htm (no styling)

Let me know the wording and I'll implement it!
"The only way to predict the future... is to invent it" -Alan Kay
Phalynx
Posts: 2324
Joined: Mon Dec 26, 2005 12:12 am
Location: Middle England
Contact:

Postby Phalynx » Tue Mar 21, 2006 11:32 am

Thats a usefull addition, and you did the hard bit as well, Nice one!
R.I.P:
Blake Stone, Jizz Bucket, Patterson Queasley, Billy Sherwood, Chavlet D'Arcy, Johnson.
olaf
Posts: 60
Joined: Fri Jun 24, 2005 4:54 am

Postby olaf » Wed Mar 22, 2006 5:57 am

olaf wrote:Or at least please make it so when you edit one you've already done, it doesn't lose it...


No, what I was meaning was that at present (it's always done this for me) if you change the name and add the (<...>) and then go back to edit, it drops off.

As a coder, I can understand a couple of potential reasons why this might be, but it's still annoying.

I always hoped that the code could be shorter if we had to type it, but the button gets round that.

It doesn't work on multiple languages yet either, at least not Spanish. So if you've never renamed the person, you're fine, but once you have, it says it in English.

All things to change at the same time, IMHO.
User avatar
Torkess_theCommie
Posts: 499
Joined: Mon Apr 03, 2006 3:44 am
Location: British Columbia, Canada

Postby Torkess_theCommie » Sun Apr 09, 2006 10:13 pm

oo like this idea :)
Image
User avatar
bmartes
Posts: 72
Joined: Thu Apr 29, 2004 10:51 am
Location: Netherlands

Postby bmartes » Tue May 15, 2007 8:32 am

I like it too. Why is (<cantr>) not added automatically?
I'm still using ctrl-c and ctrl-v
jabber: bmartes@jabber.xs4all.nl
You find a blessed scroll labeled ELBIB YLOH.
User avatar
psymann
Posts: 270
Joined: Thu Oct 12, 2006 4:53 pm
Location: Yorkshire, UK

Postby psymann » Wed May 30, 2007 3:05 pm

*adds his vote for the button*

Surely this is easy enough to be added by coding team in about ten minutes while the kettle boils? Maybe harder than it looks, but it looks easy... :?

psymann
Retired from www.warofempires.com
(psymann, psydkik, psyborg, psyanide on chronicles of the ages v2-v6) and now seeking a peaceful life in Cantr.

Run out of Cantr minutes? Try www.battlemaster.org for more roleplaying fun.

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest