php forum
php mysql forum
php mysql smarty
 
Topic Options
#282998 - 01/08/05 09:53 PM PhotoPost hack question
ksanuk Offline
Member

Registered: 02/06/02
Posts: 297
Loc: Bangkok, Thailand
Hi,<br /><br />I found this hack at Photopostdev.com and think it will be perfect for my site (it allows all members to see their own photos, but only paying members to see all photos).<br />Problem is that part of it is missing, the part that does the checking of access.<br /><br />Could someone here figure this out, or at least point me in the right direction?<br /><br />Code of the hack is:<br />
Code:
<br />(1) At the end of function get_imagethumb in pp-inc:<br /><br />    // begin hack<br />    if ( ! permitted("PM", $theuser) )<br />      $imgtag="&lt;A HREF=/pay/payMain.php&gt;<br />             &lt;IMG SRC=../images/emptyFrame.jpg border=0 height=100 width=100 alt=\"Why is this frame empty?\"&gt;<br />             &lt;/A&gt;";<br />    // end hack<br />    return( $imgtag );<br />}<br /><br />(2) Approx line 380 of showphoto, after $imgdisp has been assigned (no more found in text search):<br /><br />  // begin hack<br />  if ( ! permitted("PM", $iuserid) )<br />  {<br />    $imgdisp="&lt;table border=\"2\" width=\"$width\" height=\"$height\" bordercolor=\"#996633\" bordercolorlight=\"#996633\" bordercolordark=\"#996633\"&gt;<br />       &lt;tr&gt;&lt;td width=\"100%\"&gt;&amp;nbsp&lt;/tr&gt;&lt;/table&gt;";<br />  }<br />  // end hack<br /><br />(3) In pp-inc, after $User=array();<br /><br />  You would need to write your own function here... depends on how you determine<br />  who is currently logged in and what thier permissions are. Key is to always permit<br />  accesss when id or name matches current login. Otherwise, only for paid members.<br /><br />  // begin hack<br />  function permitted($op, $targetId=0, $targetName="") {<br />    global $memberPermit, $memberId, $memberName;<br />    if ( ($memberId&lt;&gt;0) &amp;&amp; ($memberId==$targetId) ) return true;<br />    if ( ($memberName&lt;&gt;"Guest") &amp;&amp; ($memberName!="") &amp;&amp; strtolower($memberName)==strtolower($targetName) ) return true;<br />    for ($i=0;$i&lt;strlen($op);$i++) {<br />      $c=substr($op,$i,1);<br />      if (is_integer(strpos($memberPermit,$c))) return true;<br />    }<br />  // Allow member to see/do his own stuff  return false;<br />  }<br />  // end hack<br />
<br /><br />Sanuk!

Top
#282999 - 01/17/05 11:42 PM Re: PhotoPost hack question [Re: Deyth_Combine]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
What does this mod do? Did you already get an answer at photopostdev?
_________________________
- Allen wavey
- What Drives You?

Top
#283000 - 01/19/05 05:57 AM Re: PhotoPost hack question [Re: SurfMinister]
ksanuk Offline
Member

Registered: 02/06/02
Posts: 297
Loc: Bangkok, Thailand
Hi, <br /> <br />"What does this mod do?" <br /> <br />The hack allows everybody to see the pictures they uploaded themselves, but only those people in a specific usergroup (for instance paying members) to see all pictures. <br /> <br />"Did you already get an answer at photopostdev?" <br /> <br />Must admit I did not post there as I figured this would be more UBBT related than PhotoPost. The post in question was more than 6 months old as well. <br /> <br />Did have a bit of play with it myself, but could not get it working. <br /> <br />Sanuk!

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks