DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 26, 2017, 07:50:06 AM
Home Forums News Downloads Login Register Advanced Search
* *
DragonPrime Menu
Login
 
 
Resource Pages
Search

  Show Posts
Pages: [1] 2 3 ... 5
1  Coding Support / Coding Support Desk / Re: New Template Issues on: February 24, 2017, 10:24:44 AM
Ahhh... Yes, I found the {content} tag in all of the templates for 1.1.1. It shows up at the end of the page, though, between {petitioncount} and {username}, which doesn't make much sense. That's why I tried putting it where I wanted it to go.

yarbrough:
{title}
{text}
{text}
{petitioncount}
{content}
{username}:    {password}:

classic:
{title} {text}
{text}
{petitioncount}
{content}
{username}:    {password}:
2  Coding Support / Coding Support Desk / Re: New Template Issues on: February 24, 2017, 02:45:38 AM
I included the {content} tag in the <div class="content"> section, however, it still shows up at the end of everything, after the footer. That's why I was thinking there was something else I had missed.

As for the whole HTML5 thing, though, thank you for pointing that out. (Seriously.) I had no idea it had been recommended since 2014, until I looked it up, just now. I stopped being a developer in 2009, and I was using this project to dust off my coding skills, before trying to work as a developer, again. So, it looks like I have to learn a language, now. lol
3  Coding Support / Coding Support Desk / Re: New Template Issues on: February 24, 2017, 12:03:33 AM
Just to add to the explanation, here, in the example shown, I know that the following areas have something to do with it.

The village description comes from a races module that appears to use this hook:
Code:
case "villagetext":

Following that to the village.php, we find:
Code:
$texts = modulehook("villagetext",$origtexts);
//and now a special hook for the village
$texts = modulehook("villagetext-{$session['user']['location']}",$texts);
$schemas = $texts['schemas'];

tlschema($schemas['title']);
page_header($texts['title']);
tlschema();

addcommentary();
$skipvillagedesc = handle_event("village");
checkday();

It also shows the following, at the end:
Code:
if (!$skipvillagedesc) {
modulehook("collapse{", array("name"=>"villagedesc-".$session['user']['location']));
tlschema($schemas['text']);
output($texts['text']);
tlschema();
modulehook("}collapse");
modulehook("collapse{", array("name"=>"villageclock-".$session['user']['location']));
tlschema($schemas['clock']);
output($texts['clock'],getgametime());
tlschema();
modulehook("}collapse");
modulehook("village-desc",$texts);
//support for a special village-only hook
modulehook("village-desc-{$session['user']['location']}",$texts);
if ($texts['newestplayer'] > "" && $texts['newest']) {
modulehook("collapse{", array("name"=>"villagenewest-".$session['user']['location']));
tlschema($schemas['newest']);
output($texts['newest'], $texts['newestplayer']);
tlschema();
$id = $texts['newestid'];
if ($session['user']['superuser'] & SU_EDIT_USERS && $id) {
$edit = translate_inline("Edit");
rawoutput(" [<a href='user.php?op=edit&userid=$id'>$edit</a>]");
addnav("","user.php?op=edit&userid=$id");
}
output_notl("`n");
modulehook("}collapse");
}
}
modulehook("village",$texts);
//special hook for all villages... saves queries...
modulehook("village-{$session['user']['location']}",$texts);

if ($skipvillagedesc) output("`n");

$args = modulehook("blockcommentarea", array("section"=>$texts['section']));
if (!isset($args['block']) || $args['block'] != 'yes') {
tlschema($schemas['talk']);
output($texts['talk']);
tlschema();
commentdisplay("",$texts['section'],"Speak",25,$texts['sayline'], $schemas['sayline']);
}

module_display_events("village", "village.php");
page_footer();
?>

I also know that "village" and "villagehook" show up in cities.php, but they seem to only be there in order to add new instances to the navigation options. Commentary.php also seems to be useless, aside from passing along the name of the village. And, home.php seems to be of no use, aside from using "villagename" in conjunction with telling what time it is.
4  Coding Support / Coding Support Desk / New Template Issues on: February 23, 2017, 04:53:38 PM
Hello all,

I haven't posted here in years, but I've recently started working with version 1.1.1 of the system again. As such, I've been building a new, more modern template, using XHTML, and everything works great except for one nagging issue. Namely, all of the content areas, like the login section, village descriptions, and comment section, are being passed onto the page without getting placed into the content section. I've gone over all of the hooks that should be in the template, and none of them seem to be pulling from where the content actually is (for instance, there is no village* or race* hook pulling the descriptions). I've gone through everything I can think of, like pageparts, commentary, source, etc., etc., but can't seem to figure out how the info is being served. I've also tried moving the commented sections, like the login area, into the main page code, but it breaks the template, if you do.

So, can anyone tell me how to contain the text (descriptions/commentary) properly, and get it to where it needs to go? Also, can anyone think of a way to make it work so that I don't need to have two sets of header info? I've tried to get it to work off of the usual single header, but the system seems to require two full sets.

Thank you in advance.

Here's a screenshot, showing what the problem looks like:


And, here's the template I've created, so far: (Edited to match current version, with no change in the issues faced.)
Code:
<!--!popuphead-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<!--
Copyright: Me
License: All Rights Reserved>
-->
<!-- Meta Data -->
<title>{title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="templates/v2.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
<link rel="icon" type="image/png" href="images/logindragon.gif" />
{headscript}{script}
</head>
<body dir="ltr" lang="en-US" ontouchstart="" xml:lang="en-US">
<div class="sidenav center small hide-small card-2">
<ul style="list-style-type: none;">
<li><span class='pagetitle'>{title}</span></li>
<li>{copyright} Designed by Me</li>
</ul>
</body>
</html>
<!--!header-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>{title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="public" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="templates/v2.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
<link rel="icon" type="image/png" href="images/logindragon.gif" />
{headscript}{script}
</head>
<body dir="ltr" lang="en-US" ontouchstart="" xml:lang="en-US">

<div class="sidenav center card-2">
<ul style="list-style-type: none;margin-left:-40px;">
<li><strong>{title}</strong></li>
<li>{nav}</li>
<li><div class="amber card-2">{stats}</div></li>
<li>{navad}</li>
<li>{motd}</li>
<li>{mail}</li>
<li>{petition}</li>
<li>{paypal}</li>
<li>{verticalad}</li>
<li><div class="amber card-2" style="margin-left:-40px;">{petitiondisplay}</div></li>
</ul>
</div>

<div class="padding-large">

  <!-- Header -->
<div class="container padding-24 center">
<h1 class="jumbo">{headerad}</h1>
<h2>{title}</h2>
<p>THIS IS WHERE THE HEADER ENDS</p>
</div>

  <!-- Content -->
<div class="content justify padding-64">
{content}
{bodyad}
{source}
{version}
<p>THIS IS WHERE THE CONTENT ENDS</p>
</div>

<div class="footer justify">
<ul style="list-style-type: none;">
<li>{copyright} Designed by Me ({pagegen})</li>
<li>THIS IS WHERE THE FOOTER ENDS</li>
</ul>
</div>
</div>
</body>
</html>

<!--!statstart--><div class="center card-2"><ul style="list-style-type:none;margin-left:-40px;">
<!--!stathead--><li><strong>{title}</strong></li>
<!--!statrow--><li><strong>{title}</strong> {value}</li>
<!--!statbuff--><li><strong>{title}</strong> {value}</li>
<!--!statend--></ul></div>
<!--!navhead--><div class="amber center card-2"><strong>{title}</strong></div>
<!--!navhelp--><strong>{text}</strong>
<!--!navitem--><a href="{link}"{accesskey}class="nav" {popup}>{text}</a>
<!--!petitioncount--><ul style="list-style-type: none;"><li>{petitioncount}</li></ul>
<!--!login-->
<div class="content justify padding-64">
<ul style="list-style-type: none;">
<li><img src="images/logindragon.gif" class="noborder"></li>
<li>{username}:<br /><input name='name' id="name" accesskey="u" size="10"></li>
<li>{password}:<br /><input name="password" id="password" accesskey="p" type="password" size="10"></li>
<li><input type="submit" value="{button}" class="button"></li>
</ul>
</div>
<!--!loginfull-->
<div class="content justify padding-64">
<ul style="list-style-type: none;">
<li><img src="images/logindragon.gif" class="noborder"></li>
<li>Server Full!</li>
</ul>
</div>


5  Village Square / General Discussion Area / Re: Help With Tables on: September 13, 2009, 12:31:14 AM
Thank you for your reply. I will play around with it, and see if I can make it work. For right now though, I managed to figure out two "down and dirty" ways to do what I needed; one using php, and the other using normal html in slightly more creative ways.

In case anyone else needs a quick fix for their projects in the future, here's my code:

Code:
<div style="border:1px solid; width:440px; height:300px; overflow:scroll;">
<table class="sortable">
<thead>
  <tr>
  <th>Name</th>
  <th>Location</th>
  <th class="sorttable_nosort">Phone</th>
  <th class="sorttable_nosort">Email &amp; Website</th>
  <th class="sorttable_nosort">Services</th>
  <th class="sorttable_nosort">Biography</th>
  </tr>
</thead>
  <tr><td>Bonkers, Burt</td><td>USA, Colorado</td><td>xxx-xxx-xxxx</td><td>bbonkers@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td><td><?php $text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac elit in velit adipiscing ornare. Fusce aliquam blandit ipsum, vel consequat ipsum fermentum eget. Duis posuere, augue sed aliquam interdum, urna massa dignissim odio, a fringilla lacus erat vel libero. Ut in libero vitae justo tristique vehicula quis sed sapien. Ut rhoncus mi et libero congue vulputate. Sed velit elit, mattis ac ullamcorper ac, porta et dui. Suspendisse potenti. Suspendisse potenti. Duis lobortis, felis a sodales sodales, sem erat faucibus ipsum, at tristique enim arcu nec mi. Donec ut tortor orci. Nulla tristique dui in mi aliquet ac ultricies magna rhoncus. Phasellus volutpat, dui bibendum blandit imperdiet, massa nisl elementum felis, id fringilla turpis diam vel dui. In auctor posuere lacus vitae pellentesque. Quisque sapien nulla, porta id lobortis nec, porttitor non ipsum."$newtext wordwrap($text65"<br />\n"1); echo $newtext?></td></tr>
  <tr height="100px"><td>Cassidy, Karen</td><td>USA, Michigan</td><td>xxx-xxx-xxxx</td><td>kcassidy@yahoo.com</td><td><textarea rows="3" style="width: 100px">Weddings, Civil Unions, Baptisms</textarea></td><td><textarea rows="3" style="width: 370px">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac elit in velit adipiscing ornare. Fusce aliquam blandit ipsum, vel consequat ipsum fermentum eget. Duis posuere, augue sed aliquam interdum, urna massa dignissim odio, a fringilla lacus erat vel libero. Ut in libero vitae justo tristique vehicula quis sed sapien. Ut rhoncus mi et libero congue vulputate. Sed velit elit, mattis ac ullamcorper ac, porta et dui. Suspendisse potenti. Suspendisse potenti. Duis lobortis, felis a sodales sodales, sem erat faucibus ipsum, at tristique enim arcu nec mi. Donec ut tortor orci. Nulla tristique dui in mi aliquet ac ultricies magna rhoncus. Phasellus volutpat, dui bibendum blandit imperdiet, massa nisl elementum felis, id fringilla turpis diam vel dui. In auctor posuere lacus vitae pellentesque. Quisque sapien nulla, porta id lobortis nec, porttitor non ipsum.</textarea></td></tr>
</table></div>
</div>

Keep the ideas coming though, on how to either keep the rows joined, or mimic a row with CSS, etc., as visually, that's what I would prefer.  Wink
6  Village Square / General Discussion Area / Re: Help With Tables on: September 11, 2009, 11:32:46 PM
I actually did contact the author about what I was trying to do, earlier. He said, "I'm afraid that having sorttable treat two rows as being one row for the purposes of sorting requires changes to sorttable. If you're
interested in that sort of custom enhancement, let me know, and we can talk about rates and so on..." I was just hoping that I could find another way, that wouldn't actually require changes to the javascript itself, as I could swear I remembered doing something similar in CSS years ago.... possibly dealing with floats...? Huh

To put it simply, working with tables again has been interesting enough, but going back to picking through js is downright scary to think about for me; it might as well be Visual Basic at this point, since I haven't really used any of them much in the past 5-6 years. One of the oddest parts of being an ex web developer, is discovering how much you've actually forgotten with time. The easiest way to explain it, would probably be to imagine what life would be like for Bruce Wayne if he ever decided to become Amish. Wink
7  Village Square / General Discussion Area / Re: Help With Tables on: September 11, 2009, 09:41:04 PM
Hello...

Basically, all that really needs to be paid attention to is this:

Code:
<tr><td>Adams, Aaron</td><td>USA, Utah</td><td>xxx-xxx-xxxx</td><td>aadams@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td><tr>
    </tr><td colspan=5>Bio information goes here.</td></tr>

What I'm trying to do, is to make sure that each member listing has two rows that stay together when I use the sort function. The problem, is that because I need to use colspan for the bio section, I have to start a new row, so I need to get the bio row to keep it's relative position to the name/location/etc. row.

In the end, it should look something like this when sorted by name... :

Jane Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services
Bio: aaa
John Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services
Bio: bbb


Instead of this, which is what I currently get when I sort by name... :

Bio: aaa
Bio: bbb
Jane Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services
John Smith  USA, California   xxx-xxx-xxxx  jsmith@aol.com Services


I have been racking my brains trying to figure out a way to maybe even make it all coded as one row, and then make the bio section simply "spill over" to where the next row would show up, but I haven't been able to come up with anything that works.

Does that make a little more sense?  Huh
8  Village Square / General Discussion Area / Help With Tables on: September 11, 2009, 01:51:54 PM
Hello all...

I have a question on creating tables that I figured somebody in here might be able to help me solve. I am trying to help put a site together for a seminary that includes a sortable table for member information. I am currently using sorttable.js (which can be found at http://www.kryogenix.org/code/browser/sorttable/ ) to do this, which does exactly what it's supposed to.

The problem, however, is this: I need the "Bio information" row to follow the main info row when it gets sorted. While I know there has to be some quick, easy way to make the rows related, I'm at a complete loss as to how to make it happen.

Background: The site is designed in XHTML 1.0 Strict, with CSS 2.1, and uses PHP includes. I also don't want to have to resort to creating databases to do this, as the people running the site would have no idea how to maintain them if I did. And, as I am doing the work for free, I can't offer much in the way of payment for help, despite being more than willing to make a donation for someone's time.

Below, you will find the table as I have it now:

Code:
<table class="sortable">
<thead>
  <tr>
  <th>Name</th>
  <th>Location</th>
  <th class="sorttable_nosort" >Phone</th>
  <th class="sorttable_nosort" >Email &amp; Website</th>
  <th class="sorttable_nosort" >Services</th>
  </tr>
</thead>
  <tr><td>Adams, Aaron</td><td>USA, Utah</td><td>xxx-xxx-xxxx</td><td>aadams@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td><tr>
    </tr><td colspan=5>Bio information goes here.</td></tr>
  <tr><td>Bonkers, Burt</td><td>USA, Colorado</td><td>xxx-xxx-xxxx</td><td>bbonkers@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td></tr>
  <tr><td>Cassidy, Karen</td><td>USA, Michigan</td><td>xxx-xxx-xxxx</td><td>kcassidy@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td></tr>
  <tr><td>Hynes, Duncan</td><td>UK, England, London</td><td>xxx-xxx-xxxx</td><td>dhynes@yahoo.com</td><td>Weddings, Civil Unions, Baptisms</td></tr>
</table>

Thank you all in advance for any help you can provide, as this project has been killing me... lol
9  Village Square / General Discussion Area / Re: AI NPC's on: January 21, 2009, 09:58:01 PM
Sounds like a plan. Now that I'm finally back on DSL, I'll be doing alot more on my site as well... So, with all due luck, I can help shortly.  Grin
10  Game Administration, Installation and Configuration / Installation and Configuration Assistance / Re: Creature not saved! on: December 29, 2008, 11:10:07 AM
That would explain it....lol
11  Coding Support / Coding Support Desk / Re: Village News on: December 28, 2008, 06:29:20 PM
http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=963

Is that what you're looking for? Only it's written by Lonny and not Nightborn..

That one was supposed to not work correctly with 1.0+, and Nightborn supposedly made an updated version.
12  Coding Support / Coding Support Desk / Village News on: December 28, 2008, 04:43:57 PM
Alright.. I have searched through everything I could think of, and got the impression that the module by Nightborn was the one to look for. However, I can't seem to find it anywhere.... So, does anyone either know where it is, or know of one I should be using instead? Using the commentary to post news to every single village is becoming a bit tedious, and I'd prefer to not have to reinvent the wheel if I don't have to.  Wink
13  Game Administration, Installation and Configuration / Installation and Configuration Assistance / Re: Creature not saved! on: December 28, 2008, 01:29:56 PM
Feels like more information is needed.  How did you find these null creatures, did they have any associated information (like creatureid) that you recall, how did you delete them?  And most importantly, what is the error that you are getting when you try to save a creature?

The "creatures" had no names or IDs that I recall.... they seemed to simply be empty/redundant rows, with a few spaces here and there labeled (NULL) (such as creatureweapon, creaturewin, etc..). I simply clicked the box next to each row and deleted them, as I had noticed that in my creature editor before, I was showing 3 "creatures" that I couldn't view or open up, that showed up above level 1 (where level 0 would be if there was one).

As for the error I get though, it is exactly what it says in the heading for my post... "Creature not saved!" Nothing else. I can still go into the editor and make changes, and all the information is as it should be from before this happened, I just can't save anything dealing with creatures now. The best I can figure out, is that there was supposed to be some sort of a place holder row in the db to be used as a template of some sort, and I deleted it.

On a side note, I am running 1.1.1 with the patch. I wasn't even aware of there being a newer version.

****Update****
I just tried going in and editing creatures again, and everything is working perfectly. I have no idea of how or why, since I haven't changed anything, but I can suddenly create creatures and edit them again. Maybe whatever I changed before simply needed to be updated by the newday?    Shocked
14  Village Square / General Discussion Area / Re: AI NPC's on: December 28, 2008, 02:54:28 AM
Yes.. but NPCs are just "there"... They never have a "logged in" status that I'm aware of. Just one reason why they don't show up in PvP, I would assume. It probably looks for someone from the accounts db.
15  Game Administration, Installation and Configuration / Installation and Configuration Assistance / Creature not saved! on: December 28, 2008, 12:33:48 AM
Alright, trying to be a game tweaking genius, I went into the creatures db to check the HPs, etc. of my creatures. While there, I noticed I had a couple of NULL "creatures" that I figured were redundant sets created by starting to make a creature and not finishing, etc... So, long story made short, I deleted them. Now, I can't save any of my creatures.

I know how to add a new row to my db, etc... but I have no idea what to put into it/them when I do. Can someone please help me? I was almost done with my creature pool, and now I'm just floating.   Embarrassed
Pages: [1] 2 3 ... 5

*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

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