[DEV] Last X [attachments] on Forum v.0.0.4 (en)

DEV-Area for phpBB 3.0.x

[DEV] Last X [attachments] on Forum v.0.0.4 (en)

Postby 4seven » Sun 27. Dec 2009, 05:40 | Userzeit: +1.00 / So 27. Dez 2009, 05:40

Last X [attachments] on Forum

MOD-Title: Last X [attachments] on Forum
MOD-Version: 0.0.4
MOD-Author: 4seven

Credits: irdem for a little code part of Attached taken photos by you
Credits: John Davenport Scheuer for Crawl Script
Credits: Beta-Tester: jonnilaumann

MOD-Description: This Mod shows the last X [attachments] on Viewforum or Index

phpBB-Version: phpBB 3.0.x
phpBB-Languages: en (at this time hardcoded, bcs. of little language entrys), de follows
phpBB-Styles: all Styles, that are based on prosilver, (subsilver2 follows)

Demos:
http://4seven.bplaced.net/phpbb3/index.php ----------------------- (Crawl-Script - prosilver)
http://4seven.bplaced.net/phpbb3/index.php?style=3 -------------- (Crawl-Script - subsilver2)
http://4seven.bplaced.net/phpbb3/index.php?style=4 -------------- (Crawl-Script - AeroBlue)

Features:
- shows the last X [attachments] from topics on viewforum or index
- attachments only shown from forums the user have rights to read
- if user have no rights to read in any forum the div was invisible (new in v.0.0.2)
- auto-fit the number of thumbs to screen-resolution
- real attach-thumbs without client-resizing
- centered and prosilver-styled
- thread-title in link title-tag
- direct link from attach to post
- dead link check
- min-thumbing -function
- cleaned and optimized script
- two versions available (Standard Script and Crawl Script)

NEW in v.0.0.3
- subsilver added
- css added (now it looks like on testforum (css-image-hover))
- Little structural changes to main includes
- Delete-orphaned-thumbs Module in Postbox (under 'Lock topic' in 'Options')

NEW in v.0.0.4
- min-thumbing -function
no pic is thumbing under given size of $convert_mx_size = 100; - adjustable in include/last_x_attachments_on_forum.php and include/last_x_attachments_on_forum_crawl.php - no matter if its the width or height that is under 100
- increase performance of thumbing-process bcs. of new include/thumb_resize.php
- increase board performance bcs.of smaller pic-size:
http://www.phpbb.com/community/viewtopi ... #p11908835

Planned for v.0.0.5
- new "mix" size-option - squares the pic to exact fit (takes always the very center part of every pic (if not squared allready))
- time-controlled orphan function by request: http://www.phpbb.com/community/viewtopi ... #p11909265

Planned:
- ACP??
- ??

Image follows

Download:

Last_X_[attachments]_on_Forum_v.0.0.4.zip
(17.57 KiB) Downloaded 313 times


Instruction:

see >> install.txt

User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Sun 27. Dec 2009, 05:40 +1.00
Userzeit: So 27. Dez 2009, 05:40

Re: [DEV] Last X [attachments] on Forum v.0.0.1 (release)

Postby 4seven » Fri 8. Jan 2010, 18:53 | Userzeit: +1.00 / So 27. Dez 2009, 05:40

Hint:

Until the ACP is not ready, you find the Settings under
Code: Select all
//---------SETTINGS-------------------------
Section
in
Code: Select all
includes/last_x_attachments_on_forum.php
and
Code: Select all
includes/last_x_attachments_on_forum_crawl.php


Make all settings to your desire, before you ask anything

Hint
Detect screen-resolution is per default set to no
Code: Select all
$detect_java_screen  = 'no';
Activate it, if u want to detect it
User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Fri 8. Jan 2010, 18:53 +1.00
Userzeit: So 27. Dez 2009, 05:40

Re: [DEV] Last X [attachments] on Forum v.0.0.3 (en) (update

Postby 4seven » Mon 18. Jan 2010, 03:02 | Userzeit: +1.00 / So 27. Dez 2009, 05:40



Tricks and Tweaks for "Last X [attachments] on Forum"
A special Tweak for this Mod

Here u see an oversight in index.php of all "Last X Attachments" from all forums
http://4seven.bplaced.net/phpbb3/index.php

In viewforum.php you will see only those "Last X Attachments" from the forum you looking at
http://4seven.bplaced.net/phpbb3/viewforum.php?f=9
http://4seven.bplaced.net/phpbb3/viewforum.php?f=7

If u need this for your forum, follow the Instruction (its simple, so dont be afraid)



Instruction

- Make the normal Install for crawl-script on index (with forum-id's u want to show)
- But change a little part for index_body.html

Find

Code: Select all
<strong>Last {NUMBER_OF_SHOWN_ATTACH} Attachments in Forum</strong> 
<!-- IF S_NO_JAVA_DETECTION --><!-- IF S_NO_JAVA_PRESENT --><br />Crawl Script - Calculated on your Screen Resolution of {SCREEN_WIDTH}x{SCREEN_HEIGHT}<!-- ELSE --><br />You have Javascript disabled - Activate it to see the Crawl Script<!-- ENDIF --><!-- ENDIF --> 


Replace with

Code: Select all
<span style="color:grey;">Last Attachments in all Forums
<!-- IF S_NO_JAVA_DETECTION --><!-- IF S_NO_JAVA_PRESENT --><!-- ELSE --><br />You have Javascript disabled - Activate it to let the pics fit to your screen<!-- ENDIF --><!-- ENDIF --></span> 


- Than make copy of last_x_attachments_on_forum_crawl.php and name it last_x_attachments_on_viewforum_crawl.php
- Than open last_x_attachments_on_viewforum_crawl.php and make following changes

Find

Code: Select all
//---------SETTINGS------------------------------------------------------
// here u can enter the foren id's to show
$forum_ids_to_show = '7,9,10';
// enter as given: '7,9,10'
//----------------------------------            


Replace with

Code: Select all
//---------SETTINGS------------------------------------------------------
// here u can enter the foren id's to show
// $forum_ids_to_show = '7,9,10';
$forum_ids_to_show = request_var('f', 0);
// enter as given: '7,9,10'
//----------------------------------            


- Upload last_x_attachments_on_viewforum_crawl.php to includes/last_x_attachments_on_viewforum_crawl.php

- Than make the normal install for crawl-script on viewforum
- But change a little part for viewforum.php

Open

viewforum.php

Code: Select all
    $s_type_switch = 0;
    foreach ($topic_list as $topic_id)
    { 


Before add

Code: Select all
// 4seven / Last X [attachments] on Forum / 2010
include_once($phpbb_root_path . 'includes/last_x_attachments_on_viewforum_crawl.' . $phpEx);    
// 4seven / Last X [attachments] on Forum / 2010          


- And, change a little part for viewforum_body.html

Put the crawl-script part for viewforum_body.html after

Code: Select all
<!-- INCLUDE overall_header.html --> 


Than (after insert) find

Code: Select all
<strong>Last {NUMBER_OF_SHOWN_ATTACH} Attachments in Forum</strong> 
<!-- IF S_NO_JAVA_DETECTION --><!-- IF S_NO_JAVA_PRESENT --><br />Crawl Script - Calculated on your Screen Resolution of {SCREEN_WIDTH}x{SCREEN_HEIGHT}<!-- ELSE --><br />You have Javascript disabled - Activate it to see the Crawl Script<!-- ENDIF --><!-- ENDIF --> 


Replace with

Code: Select all
<span style="color:grey;">Last Attachments in</span> <span style="color:darkred;">{FORUM_NAME}
<!--
 IF S_NO_JAVA_DETECTION --><!-- IF S_NO_JAVA_PRESENT --><!-- ELSE --><br />You have Javascript disabled - Activate it to see the Crawl Script<!-- ENDIF --><!-- ENDIF --></span> 


- Clear all Board- and Browser-Caches
User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Mon 18. Jan 2010, 03:02 +1.00
Userzeit: So 27. Dez 2009, 05:40

Re: [DEV] Last X [attachments] on Forum v.0.0.4 (en) (update)

Postby 4seven » Sat 13. Feb 2010, 18:50 | Userzeit: +1.00 / So 27. Dez 2009, 05:40

Function Update v.0.0.3 > v.0.0.4

- min-thumbing -function
no pic is thumbing under given size of $convert_mx_size = 100; - adjustable in include/last_x_attachments_on_forum.php and include/last_x_attachments_on_forum_crawl.php - no matter if its the width or height that is under 100
- increase performance of thumbing-process bcs. of new include/thumb_resize.php
- increase board performance bcs.of smaller pic-size:
http://www.phpbb.com/community/viewtopi ... #p11908835

To Update delete, load up again from new package

thumb_resize.php
include/thumb_resize.php
include/last_x_attachments_on_forum.php
include/last_x_attachments_on_forum_crawl.php


but before u re-pload the new files (include/last_x_attachments_on_forum.php and include/last_x_attachments_on_forum_crawl.php), make shure u enter your "old settings" in the
Code: Select all
//---------SETTINGS------------------------------------------------------
area of the updated files


further .. find

in your viewforum_body.html or index_body.html all

Code: Select all
<!-- BEGIN forum_pics -->


after all add

Code: Select all
<!-- IF forum_pics.S_2_SMALL -->


find all

Code: Select all
<!-- END forum_pics -->


before all add

Code: Select all
<!-- ENDIF -->


- clear all board- and browser-caches

Note
if u enter new settings in include/last_x_attachments_on_forum.php and include/last_x_attachments_on_forum_crawl.php delete all existing files in images/last_x_att (exclude index.htm) and clear all board- and browser-caches..
User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Sat 13. Feb 2010, 18:50 +1.00
Userzeit: So 27. Dez 2009, 05:40

Re: [DEV] Last X [attachments] on Forum v.0.0.4 (en) (update)

Postby 4seven » Sun 14. Feb 2010, 15:32 | Userzeit: +1.00 / So 27. Dez 2009, 05:40

Note

a little hurry-up-error in v.0.0.4 > so download package again.
but clear your browser-caches before u visit my download-link

load up this files again

includes/last_x_attachments_on_forum_crawl.php
includes/last_x_attachments_on_forum_index_crawl.php

or edit this two files from your last downloaded v.0.0.4 package and

find in both files

Code: Select all
$phpbb_root_path . 'thumb_resize.' . $phpEx


replace with

Code: Select all
$phpbb_root_path . 'includes/thumb_resize.' . $phpEx


upload files again. clear all caches. thats it
User avatar
4seven
Administrator
 
Posts: 427
 
Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...
 
Joined:
Sun 13. Jan 2008, 23:44
 
Letzter Login:
Mon 1. Aug 2022, 16:40
 
Posted:
Sun 14. Feb 2010, 15:32 +1.00
Userzeit: So 27. Dez 2009, 05:40


Return to [DEV] Mods for 3.0.x



Who is online

Users browsing this forum: No registered users and 1 guest

cron