326

(0 replies, posted in Programming)

Hey, does anybody have an idea how to combine the following two queries?

QUERY 1

$result = $db->query("SELECT p.id, p.poster, p.poster_id, p.message, p.topic_id, p.first_post, t.subject, t.forum_id FROM ".$db->prefix."posts AS p INNER JOIN ".$db->prefix."topics AS t ON t.id=p.topic_id WHERE p.deleted=1 ORDER BY p.posted DESC LIMIT ".$p.", 10");
$deleted_post = $db->fetch_assoc($result);

QUERY 2

$inner = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE first_post=1 AND topic_id='.$deleted_post['topic_id'].' AND id!='.$deleted_post['id']);

My problem is that the second query is run for every single row that the first query fetches. Anybody have an idea how to fix that?

327

(3 replies, posted in Programming)

never mind. solved. little coding error on my side...

328

(3 replies, posted in Programming)

ok almost got it working now, except when shown the first time (no &p=<whatever> in the address bar) the pagination goes something like this:
Pages: 1 2 ... 2
Why?????

329

(3 replies, posted in Programming)

I don't really have much time for this, so could somebody pleeeeeaaaase post a quick guide how to do pagination....?

update from previous version 1.1 is also available

Screenshot of admin plugin available here

##
##
##        Mod title:  Deleted posts log 
##
##      Mod version:  1.2
##   Works on PunBB:  1.2.* (as far as I know) 
##     Release date:  06-01-2007 
##           Author:  Franz Liedke 
##
##      Description:  Provides a plugin that displays a log of all deleted posts. These posts can be restored or deleted forever. 
##
##       Affects DB:  Yes 
##
##   Affected files:  viewtopic.php 
##                    include\functions.php 
##                    delete.php 
##                    viewforum.php 
##
##            Notes:  Adds columns to the following database tables:
##            topics
##            posts
##            subscriptions 
##
##      Changelog:  Version 1.0.1
##            now includes an install_mod.php file
##              Version 1.0,2
##            full subscription support
##              Version 1.1
##            now working completely with topics that are deleted
##            also fixes number of replies and topics in viewforum.php and index.php
##            plugin is now also available for moderators
##              Version 1.2
##            more user-friendly / idiot-proof
##            users aren't able to restore posts as long as the topic post is not restored / does not exist
##
##  To be fixed yet:  Version 1.3
##            pagination in the log - only 10 deleted posts per page (I might make that number editable) to keep the number of queries executed at 15...
##            possibly query optimization
##            latest post display
##
##     Generated By:  Auto Read-Me(by Caleb Champlin) - http://www.rscheatnet.com/Auto_Readme.zip
##
##       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.
##

Download here

why does it say "bold" when you hover over the copy, cut and paste buttons...?

333

(10 replies, posted in PunBB 1.2 discussion)

sweet. thanks.

why don't u fix it then dr. jeckyl? wink

335

(10 replies, posted in PunBB 1.2 discussion)

so in other words there are hooks in certain places in the punBB code and the mod developer has to place his code in these places...

336

(10 replies, posted in PunBB 1.2 discussion)

ok and in easy english?
lol
sorry i don't get how it is sure that the code is executed in the right place etc.

eCardMAX.com wrote:
lie2815 wrote:

Also, how about integrating the design better into PunBB?

What do you mean?

That is just one of my preferences. Maybe the whole thing could just be similar to the easy bbcode mod, just that it is wysiwyg and more buttons...

338

(10 replies, posted in PunBB 1.2 discussion)

could somebody please explain how the extension system for 1.3 works or is supposed to work (i mean from the code side)...

339

(5 replies, posted in PunBB 1.2 discussion)

this mod mainly does the same thing:
http://www.punres.org/desc.php?pid=176

please also release the mod at Punres

Also, how about integrating the design better into PunBB?

342

(3 replies, posted in PunBB 1.2 show off)

footer.php

oops lol

shouldn't you start the list first?
ul or ol?

http://www.punbb-hosting.com
I wonder why Smartys didn't post that wink

rondy wrote:

I think this forum (PunBB) might me the best software
for free.

You are so wrong.
It simply is lol

347

(3 replies, posted in PunBB 1.2 discussion)

Never mind. Didn't look far enough down in the code.
This is so embarassing...... roll

348

(3 replies, posted in PunBB 1.2 discussion)

idiot-proof...
i can't find it... could you paste some code?
i feel like having a brainfart but...

349

(3 replies, posted in PunBB 1.2 discussion)

Where can I find the code for the security questions in delete.php?
You know, where it asks "Do you really want to delete this topic/post?" and so on...

350

(2 replies, posted in PunBB 1.2 discussion)

Jk. Works again.