4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)

[MOD] PMv2 Tutorial Republished here

<< < (144/144)

Aleksey:
I fixed this MOD, and now it works for gallery 1.8 and php 7+

After install, you need to make these changes:

New correct Step 6

Open /includes/functions.php
Find:

--- Code: ---function format_text
--- End code ---

just comment entire function by doing this:
Add before that line:

--- Code: ---/*
--- End code ---

and at the end of the function find (in default 4images ver:1.8 it would be):

--- Code: ---  $text = str_replace("\\'", "'", $text);

  return $text;
}

--- End code ---

add after that closing bracket } add this:

--- Code: ---*/
--- End code ---

After Step 6.2

Open /includes/functions.php
Find:

--- Code: ---     $text = preg_replace("/\[php\](.*?)\[\/php\]/esi", "phphighlite('\\1')", $text);
      $text = preg_replace("/\[code\](.*?)\[\/code\]/esi", "bb_code('\\1')", $text);

--- End code ---
Replace with:

--- Code: ---     $text = preg_replace_callback("/\[php\](.*?)\[\/php\]/si", "phphighlite", $text);
      $text = preg_replace_callback("/\[code\](.*?)\[\/code\]/si", "bb_code", $text);

--- End code ---

Find:

--- Code: ---    $text = preg_replace("/\[thumb=([0-9]+)(,([0-9]+)?)?(,([a-zA-Z]+))?\]/esi","thumb('\\1','\\3','\\5')",$text);

--- End code ---
Replace with:

--- Code: ---    $text = preg_replace_callback("/\[thumb=([0-9]+)(,([0-9]+)?)?(,([a-zA-Z]+))?\]/si","thumb",$text);

--- End code ---

After Step 7

Open /includes/page_header.php
Find:

--- Code: ---      if (ereg("pm.php", $self_url) && $action == "inbox") {
--- End code ---
Replace with:

--- Code: ---      if (preg_match("/pm.php/", $self_url) && $action == "inbox") {
--- End code ---

Find:

--- Code: ---      }elseif (!ereg("pm.php", $self_url) || (ereg("pm.php", $self_url) && ($action == "sentbox" || $action == "outbox"))){

--- End code ---
Replace with:

--- Code: ---      }elseif (!preg_match("/pm.php/", $self_url) || (preg_match("/pm.php/", $self_url) && ($action == "sentbox" || $action == "outbox"))){

--- End code ---

After Step 18

Open logout.php
Find:

--- Code: ---if (!preg_match("/index\.php/", $url) && !preg_match("/lightbox\.php/", $url) && !preg_match("/login\.php/", $url) && !preg_match("/register\.php/", $url) && !preg_match("/member\.php/", $url)) {
--- End code ---
Replace with:

--- Code: ---if (!preg_match("/index\.php/", $url) && !preg_match("/lightbox\.php/", $url) && !preg_match("/login\.php/", $url) && !preg_match("/register\.php/", $url) && !preg_match("/member\.php/", $url) && !preg_match("/pm\.php/", $url)) {
--- End code ---

Download the new files attached to this message: pm.php and /includes/paging.php is archived and unarchived in your gallery.

Enjoy! :D

qBass17:
Nice !

Navigation

[0] Message Index

[*] Previous page

Go to full version