[ABD] First Topic [pic] on Forum Index v.0.0.6

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

[ABD] First Topic [pic] on Forum Index v.0.0.6

Post by 4_seven »

First Topic [pic] on Forum Index

MOD-Title: First Topic [pic] on Forum Index
MOD-Version: 0.0.6
MOD-Author: 4seven

Request by: inikad

MOD-Description: This Mod shows the first [pic] in a Topic on Forum Index, no matter if it's an Image

Image

Fixes and Features in v.0.0.3
- fix "cannot redeclare class simpleresize" error
- optimize code (also build in all previous fixes)
- reduce edits

Fixes and Features in v.0.0.4
- "mix" size-option squares the pic to exact fit (if not squared allready) ... request by fantastic http://www.phpbb.com/community/viewtopi ... #p12028595
- optimize performance of code
- reduce edits

Fixes and Features in v.0.0.5
- revised main code
- optimized thumbing code
- $display_priority mode is strict now
- bug reported by canedje is fixed
- no thumbing anymore of [img] smaller than $convert_max_size (no matter if smaller in width or height)
- optional thumb display in all search modes per request* http://www.phpbb.com/community/viewtopi ... #p12055295
- optional "no [img] pic" per request* http://www.phpbb.com/community/viewtopi ... #p12044345

Fixes and Features in v.0.0.5.a
improve performance of main files:
- first_x_in_forum_index.php
- first_x_in_forum_search.php
*fixing bug reported by michaelp74 > http://www.phpbb.com/community/viewtopi ... #p12458705
fixing bug reported by Worzel > http://4seven.kilu.de/forum/phpbb3/view ... 1426#p1426
Fixes and Features in v.0.0.6 dev-info

fix / optimize:
- increase performance of viewforum and search fundamental from ((number of topics in viewforum) querys) to 1 query in 'attachment'/'img' mode and 2 querys in 'mix' mode
- give up $display_priority for 'mix' mode. instead of this a simple 'attachment or img display' take place (even if one of them is present).
- optimized code for search-display (was not strict in results and style before)
- redesign and reducing of template-syntax
- redesign of php-code structure
- much more slender php-code
- less template-edits

new modes:
- control / remove background-colour of thumb boarder
- remove 'no [img] pic' display
- control the look and position of non affected topics (behavior of 'placeholder')
Note:
- No display of protected remote pics

Planned:
- Delete-Orphaned Modul
- ACP ??
- ??
Last edited by 4_seven on Fri Sep 30, 2011 12:32 pm, edited 41 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by kber »

i will bookmark this mod
Hello All
User avatar
Jorup16
Registered User
Posts: 427
Joined: Sun Dec 14, 2008 5:13 am
Location: Zacapa, Guatemala
Name: Jorge
Contact:

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by Jorup16 »

Interesant!!! :o
Spanish Translations for Ext phpBB :D - Traducciones al español para Ext phpBB :)
>>>>> https://github.com/Jorup16 <<<<<
User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by ashras99 »

4_seven, in my forum every where images are posted, some attached and some called from remote location.

i like to know this mod will apply to all forums but using which tweak, we can show images only in particular forum.

For ex - In 10 forums we like to show image attachment only in 2 forums and nothing in others.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by 4_seven »

see this hint in download-link..

http://4seven.kilu.de/forum/phpbb3/view ... &f=8#p1166

..to this part in install

Code: Select all

// ----------------[img] SETTINGS--------------------
// enter here the forum id's to thumbing (7,8,9) 
$affected_forum_img    = array(7,8,9); 
// but dont touch this part!
if (in_array(request_var('f', 0), $affected_forum_img)){
$affected_thumb_img = true;}
else{
$affected_thumb_img = false;}
//------------------------------------------------------------
// ------------[attachment] SETTINGS---------------
// enter here the forum id's to thumbing (7,8,9) 
$affected_forum_att    = array(7,8,9); 
// but don't touch this part!
if (in_array(request_var('f', 0), $affected_forum_att)){
$affected_thumb_att = true;}
else{
$affected_thumb_att = false;}
//------------------------------------------------------------   
so, enter in both settings the same forum-id's to affect only this forum-id's ;)
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by ashras99 »

a) Except the forum id nothing else need to be done to show in specific forum?

b) Can we chmod the directory to 755 because when running php through suphp then 777 will not work.

c) is that possible we can define width and height both for thumbnails? Otherwise height takes lot of space.. or vice-a-versa. So, defining both will make this awesome mod.

d) thumbnails will be created through imagemagik installation?
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by 4_seven »

a) Except the forum id nothing else need to be done to show in specific forum?
simply enter the id's u want to show. nothing more to do..
b) Can we chmod the directory to 755 because when running php through suphp then 777 will not work.
test it out. by the way, wtf is suphp?
c) is that possible we can define width and height both for thumbnails? Otherwise height takes lot of space.. or vice-a-versa. So, defining both will make this awesome mod.
the mod is awesome 'as it is' . i will have a "naturell fit", so when a pic is more in height than width, than it's so, it's naturell. the width-solution is almost perfect and looks best for me.
d) thumbnails will be created through imagemagik installation?
no, it's standard-gd (2.*+). no imagemagik needed. works perfect this way in a high quality and (also) much boards, especially low-cost-boards, almost have no imagemagik activated..
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by ashras99 »

Suphp - suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.

Yes, that's a good mod but if you add the height functionality then give more customization feature to user. I just suggested a feature which i think necessary, its your mod and you have full right. Btw, Thanks for helping the community, some will find this mod useful.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by 4_seven »

the giving of height is allready implemented, but i know what u mean. when u can enter width and height on a non-(exact)-squared pic, than the pic is squashed. other solutions with fake-fit (eg. black-bars) are not my style. maybe as plugin, if someone need it this way. but, it's not really important these days, so i do it later...
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by ashras99 »

if thumbnail is created according to the aspect ratio (something will cropped but no problem to many, because thumbnail here is just for idea before to open a topic) then no black bars or squashed image, because these 2 are bad way of showing images.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by 4_seven »

jap, add it on to-do-list..
Current Mods | Mod Base | php(BB) programming | No help via PM
artisanfx
Registered User
Posts: 75
Joined: Thu Nov 20, 2003 10:30 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by artisanfx »

hallo 4_seven

First of all i want to say that you do really a great work and thank you for sharing your work to the public

I install the mod and it works great but i have some problem with it
problem is the externel img file's when i set the BASIC-SETTINGS to mix and start the forum after a while the brouser returns with this error :

Code: Select all

Fatal error: Maximum execution time of 60 seconds exceeded in D:\web\xampp\htdocs\cgg\includes\thumb_resize.php on line 25
but when i just use Attach file's on the settings all works great

I think there is somethings what will happends when the img is not found or the server not available where the img link is
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by 4_seven »

a protected pic is a protected pic is a protected pic, but a pic, that one-time remote-copied is yours ;)

delete this protected pic in first post, take another. there is nearly zero solution, that work on every board (also low-cost- and free-provider) to check protected-pics .. and, i don't want to build solutions, which works only on high-end-boards with all available php-features.

note: a dead-link-check is allready implemented (in this case a thumb not appears on forum index .. without any error or "hanging")
Current Mods | Mod Base | php(BB) programming | No help via PM
artisanfx
Registered User
Posts: 75
Joined: Thu Nov 20, 2003 10:30 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by artisanfx »

eh there was no protected img on my local server, before i start the forum again, i was sure all img file on the dir "att_thumbs / img_thumbs" was deleted to start a fresh convertion.
And even i del all the dir and extracted all again to the folder but every time when i use img on the one thread on my forum i got this error :(
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] First Topic [pic] on Forum Index v.0.0.3

Post by 4_seven »

test-user and password pls

but before: check the wohle install and > important > all chmods, which noted in install ;)
eh there was no protected img on my local server
note: that have nothing to do with the folders u named, but with the pics in the web u linked in the forum. this mod works with 95% of pics u linked from www to your board. the rest are protected. u can display them, but not remote-copy them. and, there is no sign, that they are protected. simply check it out.
Last edited by 4_seven on Fri Jan 29, 2010 11:03 pm, edited 2 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
Locked

Return to “[3.0.x] Abandoned MODs”