Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tickhi Hack Version 1.4 Questions
Author Message
matrixsc
Junior Member


Posts: 47
Joined: Mar 2009
Reputation: 0
MyBux: 16
Post: #1
Tickhi Hack Version 1.4 Questions
I've downloaded and installed this plugin which is very good but is there a way somehow that allows staff (mods & Admin) to view the links without a reply?

I'm not sure what i need to change in either :-

newreply.php
search.php
showthread.php
class_parser.php
functions.php


This is the code in showthread.php

PHP Code:
$result $db->query("SELECT message FROM ".TABLE_PREFIX."posts WHERE tid='$tid' AND uid='{$mybb->user['uid']}'");
$selfposted $db->num_rows($result);
// Hide Hack End
        // Lets get the pids of the posts on this page.
        
$pids "";
        
$comma '';
        
$query $db->simple_select("posts p""p.pid""p.tid='$tid' $visible", array('order_by' => 'p.dateline''limit_start' => $start'limit' => $perpage));
        while(
$getid $db->fetch_array($query))
        {
            
$pids .= "$comma'{$getid['pid']}'";
            
$comma ",";
        }
        if(
$pids)
        {
            
$pids "pid IN($pids)";
            
            
$attachcache = array();
            if(
$thread['attachmentcount'] > 0)
            {
                
// Now lets fetch all of the attachments for these posts.
                
$query $db->simple_select("attachments""*"$pids);
                while(
$attachment $db->fetch_array($query))
                {
                    
$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
                }
            }
        }
        else
        {
            
// If there are no pid's the thread is probably awaiting approval.
            
error($lang->error_invalidthread);
        }

        
// Get the actual posts from the database here.
        
$pfirst true;
        
$posts '';
        
$query $db->query("
            SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername
            FROM "
.TABLE_PREFIX."posts p
            LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=p.uid)
            LEFT JOIN "
.TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
            LEFT JOIN "
.TABLE_PREFIX."users eu ON (eu.uid=p.edituid)
            WHERE $pids
            ORDER BY p.dateline
        "
);
        while(
$post $db->fetch_array($query))
        {
            if(
$pfirst && $thread['visible'] == 0)
            {
                
$post['visible'] = 0;
            }
            
$posts .= build_postbit($post);
            
$post '';
            
$pfirst false;
        }
        
$plugins->run_hooks("showthread_linear");
    } 


I'd really appreciate some help please so i can get this to work please I'm puling my hair out to get a wroking hide hack.


Thank you.
04-20-2009 09:09 AM
Indigo_Red
Member


Posts: 84
Joined: Dec 2008
Reputation: 0
MyBux: 2
Post: #2
RE: Tickhi Hack Version 1.4 Questions
You would have to ask Tickhi, or nickman could help you out.
04-20-2009 09:17 AM


matrixsc
Junior Member


Posts: 47
Joined: Mar 2009
Reputation: 0
MyBux: 16
Post: #3
RE: Tickhi Hack Version 1.4 Questions
Tickhi hasn't replied to any of my pm's seems a lot people want this change from what i've read :(.
04-20-2009 06:34 PM
madshark
Member


Posts: 181
Joined: Feb 2009
Reputation: 0
MyBux: 296
Post: #4
RE: Tickhi Hack Version 1.4 Questions
what exactly does this thing do ??

"Real men don't use backups, they post their stuff on a public ftp server and let the rest of the world make copies"
04-20-2009 10:32 PM


dared
Member


Posts: 52
Joined: Jul 2008
Reputation: 2
MyBux: 42
Post: #5
RE: Tickhi Hack Version 1.4 Questions
its hide hack (hides some part of messages if you use [hide][/hide] tags) and its not tickhi's mod. once i tried to find real author of plugin but i coudnt find him/her. so its a some kind of public plugin. and almost no code changing from 1.2.x. anyway, nicman maybe found a solution.

here is the original source codes:

open showthread.php

find:

PHP Code:
        // Lets get the pids of the posts on this page. 

replace:

PHP Code:
        // Hide Hack için konuya cevap verilmiş mi diye bir bakalım
        
$result $db->query("SELECT message FROM ".TABLE_PREFIX."posts WHERE tid='$tid' AND uid='{$mybb->user['uid']}'");
        
$selfposted $db->num_rows($result);

        
// Lets get the pids of the posts on this page. 


open search.php

find:

PHP Code:
            // What we do here is parse the post using our post parser, then strip the tags from it 

replace:

PHP Code:
            // Hide Hack için arama sonuçlarında eğer cevap verilmemişse gizletelim
            
$searcharray[]="/\[hide](.*)\[\/hide\]/siU";
            
$replacearray[]=" <img src=\"images/gizli.gif\"/> ";
            
$post['message'] = preg_replace($searcharray$replacearray$post['message']);
            
// What we do here is parse the post using our post parser, then strip the tags from it 


open newreply.php
find:
PHP Code:
        // Check if username exists. 

replace:

PHP Code:
        // Hide Hack için
        
$searcharray[]="/\[hide](.*)\[\/hide\]/siU";
        
$replacearray[]="";
        
$post[message] = preg_replace($searcharray$replacearray$post[message]);
        
// Check if username exists. 


open inc/class_parser.php

find:

PHP Code:
            // Fix up new lines and block level elements 

replace:

PHP Code:
            // Hide Hack için mesajın gizlenmiş oluşunu tanıtalım
            
$message hidetags($message);
            
// Fix up new lines and block level elements 


open inc/functions.php

find:

PHP Code:
?>

replace:

PHP Code:
// Hide Hack i 1.2 den 1.4.x'e uyarlamak için fonksiyonumuz
function hidetags($message)
{

    global 
$db$n$mybb$selfposted;

        
// eğer kullanıcımız misafirse ve mesaj yazma izni varsa üstüne üstlük yetkilinin biri de onun yazısının çıkmasına izin vermişse bırakalım içerik açılsın
        
if ( ($mybb->user[uid] != "0" && $selfposted "0") || $mybb->usergroup['cancp'] == "yes"
        {
            
$search="/\[hide](.*)\[\/hide\]/siU";
            
$replace="<img src=\"images/acik.gif\"><br /> \\1";
            
$message preg_replace($search$replace$message);
            
$message str_replace("\'""'"$message);
        }
        else 
//yok eğer öle olmama ihtimali varsa
        
{
            
// yok eğer konuda mesaj yayınlamasına izin verilmemişse o zaman bırak dağınık kalsın
            
$searcharray[]="/\[hide](.*)\[\/hide\]/siU";
            
$replacearray[]="<img src=\"images/gizli.gif\">";
            
$message preg_replace($searcharray$replacearray$message);
            
$message str_replace("\'""'"$message);
        }

    return 
$message//yapıcak herşeyimizi yaptık artık mesaj işlensin dimi

}

?>

also this thread contains same content with this one from req. :

http://mybbsource.com/forums/thread-1582-page-2.html
04-21-2009 02:45 AM
matrixsc
Junior Member


Posts: 47
Joined: Mar 2009
Reputation: 0
MyBux: 16
Post: #6
RE: Tickhi Hack Version 1.4 Questions
Will try this sorry i've only just replied.

Thank you.
05-10-2009 01:31 AM


Ghazala_Wali
Junior Member


Posts: 30
Joined: Apr 2009
Reputation: 0
MyBux: 0
Post: #7
RE: Tickhi Hack Version 1.4 Questions
great work dared, Its working for me fine

MyBBoard <--- Free and Exclusive Themes, Plugins and Tutorials Community
05-11-2009 12:31 AM
matrixsc
Junior Member


Posts: 47
Joined: Mar 2009
Reputation: 0
MyBux: 16
Post: #8
RE: Tickhi Hack Version 1.4 Questions
I wonder if there is away to allow staff to see without having to reply with that code .

Would anyone know how to do that?
05-11-2009 08:34 AM


Dalton
Tuts Team Lead



Posts: 1,169
Joined: Aug 2008
Reputation: 3
MyBux: 430
Post: #9
RE: Tickhi Hack Version 1.4 Questions
Err... the first post:
Quote:I've downloaded and installed this plugin which is very good but is there a way somehow that allows staff (mods & Admin) to view the links without a reply?

You REQUESTED this.. am I missing something?

05-11-2009 10:23 AM
matrixsc
Junior Member


Posts: 47
Joined: Mar 2009
Reputation: 0
MyBux: 16
Post: #10
RE: Tickhi Hack Version 1.4 Questions
I did request it but nothing came of it.

So after trying to find something i was trying to tweak it to get it to work with no luck. :(
05-11-2009 06:24 PM


 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
2 questions LadyNor 11 82 05-04-2009 03:54 AM
Last Post: LadyNor
  More questions regarding the Custom Pages Plugin.. enlightenme 7 60 02-16-2009 11:51 PM
Last Post: enlightenme



New to MyBBSource?Need Assistance?
  • Mark Forums Read
  • View Forum Staff
  • Looking for a MyBB Host?

  



Theme created by AK-47. Find more great themes and skins at K! Dezign R1s.net