Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
V2.08 Mods Completed[Auto Image Size ]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2019-01-04 14:52:07
Open theme. css

Add:

.img {
height: auto;
max-width: 600px;
}


The max-width (image width) must be adjusted according to your needs

Open functions. php

Search:

    // 
   $s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border='0' src=\"\1\" alt='' />", $s);

   // [img=http://www/image.gif]
   $s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border='0' src=\"\1\" alt='' />", $s);


Replace with:

    // 
   $s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border=\"0\" src=\"\1\" alt=\"\" class=\"img\">", $s);


   // [img=http://www/image.gif]
   $s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border=\"0\" src=\"\1\" alt=\"\" class=\"img\">", $s);
2019-03-25 14:39:38
[USER=311]@MicroMonkey[/USER] any way to make it work on 3.0?
2019-03-25 20:34:08
it should work just fine. there is no reason for it not to work since it uses a class for the image resize which is in the themes css file. You have to add the css to each themes css that you are using. if not, you could try just adding it directly to the functions file like (adjust size as needed)
    // 
   $s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border='0' src=\"\\1\" width='190px' alt='' />", $s);
   
           // [img=http://www/image.gif]
   $s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border='0' src=\"\\1\" width='190px' alt='' />", $s);

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-03-27 20:11:45
this will sent all img out its a very bad thing to add
2019-03-28 23:46:51
care to explain?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-04-04 16:28:21
yes put it on and you will see lol
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728