Soft Delete Mod and Board3?

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Soft Delete Mod and Board3?

Post by rudolfpietersma »

Your Portal Version: 1.0.2
Your phpBB Type: 3.0.4
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://prikbord.ilovebrasil.com

Description and Message
Hi,
I recently installed the Soft Delete Mod from http://www.lithiumstudios.org.
The problem is on the Portal these Soft Deleted messages are still visible.
Can somebody please help to solve this issue?

Rudolf.
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Soft Delete Mod and Board3?

Post by Ice »

The portal would have to be modified to check for the new "deleted" check mark in the database, have a look through /portal/includes/functions.php in the phpbb_fetch_posts() function and see what you can find. I'll take a look after work.
Board3 Portal Dev & English Tech Support
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Ice wrote:The portal would have to be modified to check for the new "deleted" check mark in the database, have a look through /portal/includes/functions.php in the phpbb_fetch_posts() function and see what you can find. I'll take a look after work.
Hi Ice,
I don't have that much knowledge. My experience is basic.
Would be great if you can check it for me!!

Cheers,
Rudolf.
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Can somebody help me with this issue?
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

I'm still struggling with this issue, please help me :o
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Soft Delete Mod and Board3?

Post by Kevin »

Not tested:

Open portal/includes/functions.php

search:

Code: Select all

            p.bbcode_bitfield,
            p.bbcode_uid, 
add after:

Code: Select all

            p.post_deleted, 

search:

Code: Select all

        'WHERE' => $topic_type . '
                ' . $post_time . '
                AND t.topic_status <> ' . ITEM_MOVED . '
                AND t.topic_approved = 1
                AND t.topic_moved_id = 0
                ' . $str_where,
                
        'ORDER_BY' => $topic_order, 
replace with:

Code: Select all

        'WHERE' => $topic_type . '
                ' . $post_time . '
                AND t.topic_status <> ' . ITEM_MOVED . '
                AND t.topic_approved = 1
                AND t.topic_moved_id = 0
                AND p.post_deleted = 0
                ' . $str_where,
                
        'ORDER_BY' => $topic_order, 
Dunno if this is enough, but it should keep the soft deleted topics away.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Kevin wrote:

Code: Select all

            p.post_deleted
Great stuff Kevin, it seems to work :-)

Though it needs a comma behind p.post_deleted
So:

Code: Select all

p.post_deleted,
Thanks a lot!
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Soft Delete Mod and Board3?

Post by Kevin »

Ah, forgot that. Thanks, corrected. ;)
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Hi Kevin,
I now do see in the "Recent Topics" block a soft deleted topic. Is there a same kind of way to hide it?

Rudolf.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Soft Delete Mod and Board3?

Post by Kevin »

Yes, open portal/block/recent.php

*edit*
removed wrong code - see a few posts further
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Kevin,
I'm getting a SQL error.

Code: Select all

SQL ERROR [ mysqli ]

Unknown column 'p.post_deleted' in 'where clause' [1054]

SQL

SELECT topic_title, forum_id, topic_id FROM phpbb_topics WHERE topic_status <> 2 AND topic_approved = 1 AND topic_type = 0 AND topic_moved_id = 0 AND p.post_deleted = 0 ORDER BY topic_time DESC LIMIT 10
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Soft Delete Mod and Board3?

Post by Kevin »

Yar, wrong edit, as i thought about it.
I'll provide a correct code this evening.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Hi Kevin,
Did you have some time to think about the correct code?

Cheers,
Rudolf.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Soft Delete Mod and Board3?

Post by Kevin »

Hi Rudolf,

sorry - forgot about that. Now the code, that should work:
Open portal/block/recent.php

search:

Code: Select all

//
// Recent topic (only show normal topic)
//
$sql = 'SELECT topic_title, forum_id, topic_id
    FROM ' . TOPICS_TABLE . '
    WHERE topic_status <> ' . ITEM_MOVED . '
        AND topic_approved = 1 
        AND topic_type = ' . POST_NORMAL . '
        AND topic_moved_id = 0
        ' . $sql_where . '
    ORDER BY topic_time DESC';  
replace with:

Code: Select all

//
// Recent topic (only show normal topic)
//
$sql = 'SELECT topic_title, forum_id, topic_id
    FROM ' . TOPICS_TABLE . '
    WHERE topic_status <> ' . ITEM_MOVED . '
        AND topic_approved = 1 
        AND topic_type = ' . POST_NORMAL . '
        AND topic_moved_id = 0
        AND topic_deleted = 0
        ' . $sql_where . '
    ORDER BY topic_time DESC';  

You can add the line

Code: Select all

AND topic_deleted = 0
to the "recent hot topics" and "recent announcements" too.

Cheers

Kevin
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
rudolfpietersma
Active Member
Posts: 40
Joined: 8. November 2008 13:02

Re: Soft Delete Mod and Board3?

Post by rudolfpietersma »

Kevin,
Tnx a lot, that worked just great!
Locked

Return to “board3 Portal 1.0.x - English Support”