[ Príspevok: 1 ] 
AutorSpráva
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Remove Images MOD

Registrovaný: 01.05.05
Príspevky: 12424
Témy: 1447 | 1447
Bydlisko: Bratislava
Vek: 32
NapísalOffline : 14.10.2006 15:21 | Remove Images MOD

Kód:
##############################################################
## MOD Title: remove_images.mod
## MOD Author: Blankety Blank Man < blanketyblankman@gmail.com > (Brian Shields) http://edos.siteburg.com/phpBB2/index.php
## MOD Description: Removes images from signatures in chosen forums (removal of avatars is optional),
##                  or replaces them with something else.
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: ~1 Minute
## Files To Edit: viewtopic.php
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##  My first mod, made by request of one of hte moderators on my forum, to remove
##   images from the signatures in the Trade Forum so that users could not create flashy
##   signatures to draw people to thier trade topics.
##
##  Selecting the forum:
##    At the line 'if($forum_id == 1)' replace the 1 with the forum id (viewforum.php?f=[ID])
##    of the forum you wish to affect.
##
##  Selecting multiple forums (less than half of total):
##    If you have more than one forum you wish to remove images from, change the 'if($forum_id == 1)'
##    to 'if($forum_id == 1 || $forum_id == 2)' for $forum_id's 1 and 2,
##    'if($forum_id == 1 || $forum_id == 2 || $forum_id == 3)' for $forum_id's 1, 2, and 3, etc.
##
##  Selecting multiple forums (more than half of total):
##    If you want to remove image from more than half of your forums, do the above for the forums
##    that _will_ have images, but instead of '==' use '!=', because this way you have less to
##    actually type.
##
##  Removing avatars:
##    At the line '//$poster_avatar = '';' remove the comment slashes (//) in order to remove
##    avatars.
##
##  Replacing avatars:
##    Uncomment the '//$poster_avatar = '';' line, and place something between the quotes in order to
##    replace the avatar with something of your own. example:
##      $poster_avatar = '[No avatars allowed in this forum]';
##
##  Replacing images:
##    Rather than removing the images entirely, you can replace then with something else by
##    changing the line '$replace = '';' with what you want to replace. I you want to use HTML,
##    HTML will have to be enabled on your board and the user will need HTML to be enabled.
##    If you want to use BBCode, you'll have to add the id to the tag. example:
##      $replace = '[img:'.$user_sig_bbcode_uid.']noimgsallowed.gif[/img:'.$user_sig_bbcode_uid.']';
##
##  Replacing images with the image url:
##    If you uncomment the line '//$replace = '\\1';', then only the [img] and [/img] will be removed,
##    not the url of the image. So, '[img]http://mysite.com/myimage.gif[/img]' will become
##    'http://mysite.com/myimage.gif'
##############################################################
## MOD History:
##
##   2005-04-25 - Version 1.0.1
##      - v1.0.0 EasyMOD and security rejection problems (hopefully) fixed
##      - Sped up script by a minute amount -- unoticeable, but something
##
##   2005-04-16 - Version 1.0.0
##      - Mod created and (if you're reading this) probably validated :D
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
# around line 1051
   $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
   if($forum_id == 1)
   {
      $regex_pattern = "#\[img:$user_sig_bbcode_uid\]([^\[]*)\[/img:$user_sig_bbcode_uid\]#";
      $replace = '';
      //$replace = '\\1';
      $user_sig = preg_replace($regex_pattern,$replace,$user_sig);
      //$poster_avatar = '';
   }

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


_________________
SilverStone SST CS01 | Corsair SF600 600W SFX | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 (16 Cores / 32 Threads) & Noctua NH-U9DX i4 | Kingston HyperX Savage 32 GB DDR4 2400 MHz | PNY NVIDIA Quadro K1200 DP 4 GB DDR5 | Intel SSD 750 1.2 TB NVMe & Intel SSD 730 240 GB SATA & Seagate BackUp Plus Portable 12 TB USB | 31.5" 4K LCD EIZO FlexScan EV3237 & 2 x 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech Wireless G700s | Harman Kardon Nova | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 - Intel Core i7 5600U, 8 GB DDR3 1600 MHz, Intel HD Graphics 5500, SanDisk SSD 512 GB, 12.5 FHD LED IPS, WWAN 3G 4G LTE, Microsoft Windows 7 Ultimate | Nintendo Classic Mini | BlackBerry Passport 96 GB
 [ Príspevok: 1 ] 


Remove Images MOD



Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy.

images

v HTML, XHTML, XML, CSS

9

397

24.11.2009 15:44

Svolo

V tomto fóre nie sú ďalšie neprečítané témy.

Remove COPPA

v Redakčné systémy

0

341

14.10.2006 15:05

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

background+images

v HTML, XHTML, XML, CSS

1

86

12.07.2013 17:17

shaggy

V tomto fóre nie sú ďalšie neprečítané témy.

images upload

v PHP, ASP

8

620

20.07.2006 13:57

scooby

V tomto fóre nie sú ďalšie neprečítané témy.

DOMDocument xml remove

v PHP, ASP

3

211

18.10.2010 16:03

DeaDMan

V tomto fóre nie sú ďalšie neprečítané témy.

Remove Duplicate Sessions

v Redakčné systémy

0

330

14.10.2006 14:49

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Jquery Remove LI

v JavaScript, VBScript, Ajax

2

117

24.11.2016 18:59

arno

V tomto fóre nie sú ďalšie neprečítané témy.

H: Sapphire HD4850 Dual-Slot (pencil-mod, v-mod)

v Modifikácie, návody a projekty

0

1596

18.01.2009 18:57

Vladio

V tomto fóre nie sú ďalšie neprečítané témy.

Problem s images

v Počítačové hry

14

886

25.07.2008 21:10

eXistenZ

V tomto fóre nie sú ďalšie neprečítané témy.

Add/Remove program list

v Operačné systémy Microsoft

6

495

11.01.2008 10:23

Shit

V tomto fóre nie sú ďalšie neprečítané témy.

Remove Signature From Guests

v Redakčné systémy

0

311

14.10.2006 15:03

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Orange & Black mod - mod by borec

v Modifikácie, návody a projekty

16

2612

07.08.2008 22:49

Orses

V tomto fóre nie sú ďalšie neprečítané témy.

CSS Multi Backrounds images

v HTML, XHTML, XML, CSS

4

112

05.02.2014 12:37

F3RY

V tomto fóre nie sú ďalšie neprečítané témy.

java - SimpleWindow a Images

v Assembler, C, C++, Pascal, Java

2

201

27.11.2011 20:07

mack0

V tomto fóre nie sú ďalšie neprečítané témy.

Scripty pre Images hosting

v Ostatné

0

721

02.11.2006 13:07

Exodus

V tomto fóre nie sú ďalšie neprečítané témy.

Restrict images in signatures

v Redakčné systémy

0

222

14.10.2006 15:11

JanoF



© 2005 - 2017 PCforum, edited by JanoF