[ Príspevok: 1 ] 
AutorSpráva
Offline

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

Registrovaný: 01.05.05
Príspevky: 13414
Témy: 1496 | 1496
Bydlisko: Bratislava
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


_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 11 Enterprise | APC Back-UPS BE-850 VA | Lenovo ThinkPad X250 & Microsoft Windows 11 Professional | iPhone 15 Pro 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu 24.04.1 LTS
 [ 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

580

24.11.2009 15:44

Svolo

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

images upload

v PHP, ASP

8

849

20.07.2006 13:57

scooby

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

background+images

v HTML, XHTML, XML, CSS

1

322

12.07.2013 17:17

shaggy

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

Remove COPPA

v Redakčné systémy

0

586

14.10.2006 15:05

JanoF

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

1899

18.01.2009 18:57

Vladio

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

3310

07.08.2008 22:49

Orses

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

Jquery Remove LI

v JavaScript, VBScript, Ajax

2

483

24.11.2016 18:59

arno

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

DOMDocument xml remove

v PHP, ASP

3

452

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

573

14.10.2006 14:49

JanoF

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

Problem s images

v Počítačové hry

14

1273

25.07.2008 21:10

eXistenZ

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

Remove Signature From Guests

v Redakčné systémy

0

581

14.10.2006 15:03

JanoF

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

Add/Remove program list

v Operačné systémy Microsoft

6

831

11.01.2008 10:23

Shit

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

CSS Multi Backrounds images

v HTML, XHTML, XML, CSS

4

385

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

354

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

1032

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

434

14.10.2006 15:11

JanoF



© 2005 - 2024 PCforum, edited by JanoF