[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.

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

Postby 4_seven » Sat Jan 23, 2010 4:43 am

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 [img] or [attachment)

phpBB-Version: phpBB 3.0.x
phpBB-Languages: multilingual
phpBB-Styles: prosilver

Demo: http://www.4seven.de/forum/media/viewforum.php?f=7

Features:
- Shows the first [img] or/and [attachment] from topics of chosen forums in forum-index
- per forum thumbing
- separate 'per forum thumbing' for [img]'s and [attachment]'s in 'mix' function-mode
- chequered display possibilities in 'mix' function-mode
- 'first come -first serve' mode for [img]'s and [attachment]'s in 'mix' function-mode
- Auto-thumbing of [img]'s of own or external site (in most cases > 95%)
- Auto-thumbing of [attachment]'s
- Thumbs storing on your server
- If you changed a 'first [img]' or 'first[attachment]' the thumb is auto-updated
- Link on thumbs to original [img]- or [attachment]-post
- "width" and "height" size-option (adjustable for each mode: "width", "heigt" or "mix")
- "mix" size-option squares the pic to exact fit (if not squared allready)
- dead-link-check
- perfect layout in every browser
- xhtml 1.0 strict valid / transitional (subsilver2)

Requirements: fopen()

Download: http://www.4seven.de/forum/6test/viewtopic.php?f=3&t=27

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 viewtopic.php?p=12028595#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* viewtopic.php?p=12055295#p12055295
- optional "no [img] pic" per request* viewtopic.php?p=12044345#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 > viewtopic.php?p=12458705#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
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

Postby kber » Sat Jan 23, 2010 7:20 am

i will bookmark this mod
25% off for all Hostgator services
use coupon : phpbbegypt25coupon
My phpbb3 mods And Styles | Free online games
phpBB Arabic Support Forum
| حجاب
User avatar
kber
Registered User
 
Posts: 979
Joined: Sun May 07, 2006 9:22 am
Location: Egypt

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

Postby Jorup16 » Sat Jan 23, 2010 8:16 am

Interesant!!! :o
User avatar
Jorup16
Registered User
 
Posts: 375
Joined: Sun Dec 14, 2008 5:13 am
Location: Zacapa, Guatemala
Name: Jorge

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

Postby ashras99 » Thu Jan 28, 2010 8:26 pm

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
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

Postby 4_seven » Thu Jan 28, 2010 8:45 pm

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
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

Postby ashras99 » Thu Jan 28, 2010 9:57 pm

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
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

Postby 4_seven » Thu Jan 28, 2010 10:25 pm

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
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

Postby ashras99 » Thu Jan 28, 2010 10:41 pm

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
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

Postby 4_seven » Thu Jan 28, 2010 10:51 pm

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
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

Postby ashras99 » Thu Jan 28, 2010 11:13 pm

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
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

Postby 4_seven » Thu Jan 28, 2010 11:19 pm

jap, add it on to-do-list..
Current Mods | Mod Base | php(BB) programming | No help via PM
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

Postby artisanfx » Fri Jan 29, 2010 10:12 pm

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
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

Postby 4_seven » Fri Jan 29, 2010 10:42 pm

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
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

Postby artisanfx » Fri Jan 29, 2010 10:55 pm

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 :(
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

Postby 4_seven » Fri Jan 29, 2010 10:57 pm

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
User avatar
4_seven
I've Been Banned!
 
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Next

Return to [3.0.x] Abandoned MODs

Who is online

Users browsing this forum: No registered users and 6 guests