51

(3 replies, posted in Programming)

that did it.  thanks guys!

52

(3 replies, posted in Programming)

this question will surely show my incredible ignorance of xhtml.  if i stick this in the 'announcement' box i get validation errors.

<p><a href="http://thepiratebay.org/browse">Browse Torrents</a> | <a href="http://thepiratebay.org/recent">Recent Torrents</a> | <a href="http://thepiratebay.org/tv">TV shows</a> | <a href="http://thepiratebay.org/top">Top 100</a></p>
<form action="http://thepiratebay.org/s/" method="get">
<input type="hidden" name="page" value="0" />
<input type="hidden" name="orderby" value="3" />

<input type="text" name="q" /> <b>-</b> <input type="submit" value="Pirate Search"/>

</form>

and here's the errors.

# Error  Line 46 column 44: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

<input type="hidden" name="page" value="0" />

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

# Error Line 47 column 47: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

<input type="hidden" name="orderby" value="3" />

# Error Line 49 column 29: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

<input type="text" name="q" /> <b>-</b> <input type="submit" value="Pirate Searc

# Error Line 49 column 33: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

<input type="text" name="q" />  <b>-</b> <input type="submit" value="Pirate Searc

# Error Line 49 column 83: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

... type="submit" value="Pirate Search"/>

any tips on how to fix that?  thanks.

53

(2 replies, posted in Programming)

neat!

i've been using this guys firefox add-on for web development and noticed he's also using punbb.

http://chrispederick.com/forums/

55

(4 replies, posted in PunBB 1.2 troubleshooting)

ahhh, that's what he meant.  cool.

56

(4 replies, posted in PunBB 1.2 troubleshooting)

please forgive my ignorance but i totally don't know what the hell you're talking about!

are you

(a)  trying to view rss with a browser?  why not use an rss reader?

or

(b)  trying to display feeds on your punbb based forum?  there's a couple plugins that do this.  i even put one together myself!  it's easy as pie.  simplepie.org that is.

or

(c) use the feed punbb produces?  http://yourwebsite/extern.php?action=active&type=RSS

i'm a bit confused.  state it plainly for me and i'll try to help.

57

(3 replies, posted in Programming)

i just posted the mod over at http://www.punres.org/viewtopic.php?pid=18137#p18137

thanks again.

58

(2 replies, posted in PunBB 1.2 troubleshooting)

smilies aren't working?  hell, that's a feature not a bug!  ;-)

a couple of things come to mind.  did the previous version you upgraded from keep the images in another directory?  (i'm new to punbb so this may not be valid).  did you check the administration settings?  user settings?  did you try it as another user?  any errors in your log files?

hope that helps.

59

(3 replies, posted in Programming)

thanks paul!  the way you wrote it just eliminated about a hundred errors on the w3 validator.  now all i have to do is fix my form and the module will be xhtml 1 valid.  cool.  when i post a new version of the module i'll make sure to mention you knew the answer where i had a brain cramp.  smile

60

(3 replies, posted in Programming)

hi all.  i'm trying to make my module xhtml compliant.  the following code works fine but fails the w3c test.  any tips on how to fix it?  tia.

$category_url = 'linksviewc.php?category=';

while ($row = $db->fetch_assoc($result)) {
    echo "- <b><a href=" . $category_url.$row['category'] . "> ". $row['category'] ."</a></b>"." -";
}

this should fix the problem.  i warn you, i'm pretty new at php but it seems to function properly.  please let me know if there's any other problems.  thanks!

replace linksplus.php with this:

<?php

/*

  This file isn't part of PunBB.  This file is part of 'linksplus'
  a web link modification for PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

*/

// let's stay within punbb
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'header.php';

// comment out after debugging
//error_reporting(E_ALL);

?>

<p>
<b>Welome to our Web Links Section.</b>  Members may submit links using the form below.  Please use a 
preexisting category unless absolutely necessary.  If you desire to browse our repository of weblinks 
click on a category below.
</p>

<form action="linksform.php" method="post">
 <p><b>Website Name:</b> <input type="text" name="name" /> 
 <b>URL:</b> <input type="text" name="link" /> 
 <b>Category:</b> <input type="text" name="category" /></p>
 <p><b>Description:</b> <TEXTAREA name="description" rows="2" cols="80" >
 Enter the website description here.</TEXTAREA></p>
 <input type="submit" />
</form>


<?php

echo '<p><p><b>Select a Category:</b></p></p>';

// list all categories
$table = $db->prefix.'linksplus';
$result = $db->query("SELECT DISTINCT category FROM $table 
    ORDER BY category");
    
$category_url = PUN_ROOT.'linksviewc.php?category=';  //how to list by category? get?

while ($row = $db->fetch_assoc($result)) {
    echo "<p><b><a href=" . $category_url.$row['category'] . "> ". $row['category'] ."</a></b></p>";
}


// let's stay within punbb
$footer_style = 'index';
require PUN_ROOT.'footer.php';

?>
Dr.Jeckyl wrote:

small "bug", the style reverts to the default board style when on mysite.com/linksplus.php and not the style i have chosen in my profile.

you're totally right.  i hadn't noticed that during testing as the default and profile themes were the same.  if i get a chance today or tomorrow i'll post a fix unless somebody beats me to it.

thanks for finding the bug!

i will remember next time.  :-)  thanks.

crap, should it have been in mods?

##
##
##        Mod title:  Links Plus
##
##      Mod version:  2.1
##     Works on PunBB:  1.2.15
##     Release date:  2007-06-26
##           Author:  eric235u (support@newmag.org)
##
##      Description:  This is a mod to display web links with categories and
##                    descriptions.
##
##     Affected files:  None.
##
##       Affects DB:  Yes.
##
##            Notes:  Requires MySQL.
##
##          Changes:  Admin is notified via email if new link is added.
##
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

you can see a preview at http://newmag.org/forum/linksplus.php

you can download here http://www.punres.org/files.php?pid=413

66

(10 replies, posted in Programming)

Super Mario wrote:

W3Schools

i go there sometimes too.  :-)

67

(114 replies, posted in Programming)

MattF wrote:

And just incase that page tickled your fancy, big_smile the full vi manpage on the FreeBSD site:

http://www.freebsd.org/cgi/man.cgi?quer … ormat=html

i've used vi for working with HUGE text files.  it can handle what other editors choke on.

68

(114 replies, posted in Programming)

Super Mario wrote:

Notepad

oh my god i can't imagion why.  you must be joking.  ha ha.  you got me there for a second...

hi all.  i really like the "Check for upgrade" link in the admin section of punbb.  this little feature is great!

i wish it also checked your installed mods and plugins.

is there already something like this? 

i've just made a couple of modules and i was thinking of how to let people know when a new version has come out.

thanks for any tips!

70

(10 replies, posted in Programming)

...and some severe banging of head on desk whilst rewriting test scripts...

lol

71

(10 replies, posted in Programming)

hi all.  i'm trying to learn php and i spend a lot of time here of course, http://www.php.net/manual/en/

here's another place i like to go http://hudzilla.org/phpwiki/index.php?title=Main_Page

so what's your favorite php tutorial and or manual?

thanks for any tips!

72

(4 replies, posted in PunBB 1.2 show off)

as a f/oss guy i really hate your terms of use and it makes an uninviting first page.  other than that, i really think you've done a good job with the site.  looks slick.

73

(3 replies, posted in General discussion)

i must agree.  it just sounds like a bad business deal.

you can see an example at http://newmag.org/forum/puntracker.php

kierownik wrote:

why not make an update_mod.php ?

i didn't think of it!  that's a good idea.  i will for the next version!

i should warn anybody thinking of using this mod that i'm pretty new to programming and this is a very simple indexer.  i really just made it to fit my own needs and have posted it here for the hell of it.  tasks like if you desire to remove a torrent listing you have to do it yourself.  i use phpmyadmin.  so if you're a uncomforable playing with mysql or need something more powerful this mod isn't for u.  but if you want a basic indexer u may like it.

please let me know if i've done anything particularly idiotic with the code!  thanks.