[ABD] Last X [attachments] on Forum v.0.0.4

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

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

make the settings here

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'
in
last_x_attachments_on_forum.php
or
last_x_attachments_on_forum_crawl.php

simple add the forum-id's, where "Last X [attachments]" should appear ;)
Current Mods | Mod Base | php(BB) programming | No help via PM
radhuza
Registered User
Posts: 42
Joined: Sat Dec 12, 2009 4:26 pm

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by radhuza »

Code: Select all

###################################################
INSTRUCTION FOR STANDARD SCRIPT VERSION - PROSILVER
###################################################

############################
FOR USE IN INDEX - PROSILVER
############################

#
#-----[ OPEN ]------------------------------------------
#

index.php

#
#-----[ FIND ]------------------------------------------
#

// Output page
page_header($user->lang['INDEX']);

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Last X [attachments] on Forum / 4seven / 2010
include_once($phpbb_root_path . 'includes/last_x_attachments_on_forum.' . $phpEx);	
// Last X [attachments] on Forum / 4seven / 2010

#
#-----[ OPEN ]---------------
#

styles/prosilver/template/index_body.html

#
#-----[ FIND ]-----------------
#

<!-- INCLUDE overall_header.html -->

#
#-----[ AFTER, ADD ]-----[or wherever u want - but take care of nested html]------------
#

<!-- IF S_NO_ATT_TO_SHOW -->
<div class="navbar" style="text-align: center">
<div class="inner"><span class="corners-top"><span></span></span>
<hr style="height:1px; border-color:white;" />
<strong>Last {NUMBER_OF_SHOWN_ATTACH} Attachments in Forum</strong>
<!-- IF S_NO_JAVA_DETECTION --><!-- IF S_NO_JAVA_PRESENT --><br />Standard Script - Calculated on your Screen Resolution of {SCREEN_WIDTH}x{SCREEN_HEIGHT}<!-- ELSE --><br />You have Javascript disabled - Activate it to let the pics fit to your screen<!-- ENDIF --><!-- ENDIF -->
<hr style="height:1px; border-color:white;" />
<!-- BEGIN forum_pics -->
<a class="linkrahmen" href="{forum_pics.TOPIC_IDEE}"><img class="bildrahmen" src="{forum_pics.ATTACH_TEST}" title="Topic: {forum_pics.TOPIC_TIITLEE}" alt="" /></a>&nbsp;
<!-- END forum_pics -->
<hr style="height:1px; border-color:white;" />
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->

#
#-----[ OPEN ]---------------
#

styles/prosilver/template/overall_header.html

#
#-----[ FIND ]-----------------
#

</head>

#
#-----[ BEFORE ADD ]-----------------
#

<link href="{T_THEME_PATH}/last_x_att_style.css" rel="stylesheet" type="text/css" />

#
#-----[ OPEN ]---------------
#

styles/prosilver/template/posting_editor.html

#
#-----[ FIND ]------------------------------------------
#

			<!-- IF S_LOCK_TOPIC_ALLOWED -->
				<div><label for="lock_topic"><input type="checkbox" name="lock_topic" id="lock_topic"{S_LOCK_TOPIC_CHECKED} /> {L_LOCK_TOPIC}</label></div>

#
#-----[ AFTER ADD ]-----------------
#

				<div style="position:relative;left:17px;"><a href="" onclick="var kleinesfenster = window.open('includes/last_x_attachments_on_forum_orphan.php', '_blank', 'width=400,height=400, left=0,top=0, resizable=no,status=no,menubar=no,location=no,scrollbars=yes,toolbar=no');return false" />Delete Orphaned last_x_att Files</a></div>

#
#-----------------------------------------------
#
Still nothing! I did everything according to the instructions for standard script, but still I do not see. I do not see it on the index, although index_body is fine. Thank you for your help, but I fear it will be unnecessary. :(
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

sorry, but it works 100%
in this case i can only help if a have ftp-access and test-account to post.
Current Mods | Mod Base | php(BB) programming | No help via PM
radhuza
Registered User
Posts: 42
Joined: Sat Dec 12, 2009 4:26 pm

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by radhuza »

Hi, I'm sorry, :D but this mod works perfectly right! I forgot, it shows only the Annex and not the images of the viewtopic. Thank you very much, but I would like to ask if he could not do it as I did I thought? Then I would need to index my images appear on the forums, which would have set (viewforum id). Thanks much :)

P.S. problem solved!
Dennis Jizzle
Registered User
Posts: 3
Joined: Sun Dec 13, 2009 12:23 am

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by Dennis Jizzle »

4_seven wrote:half-false mod-topic. u mean this > http://www.phpbb.com/community/viewtopi ... &t=1953215
in the demo u show, shure not all pics have the same width or height.
you see little black bars left/right up/down of some pics to fake the correct fit.
greez, 4seven......
Sry for the late reply.

Oh yea I see that now :) Anyway, it could be nice to have it on your mod aswell, maybe as a option you can choose.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

[DEV] Hint to everybody, who installed this before the new package was uploaded

check if u have the new version of thumb_resize.php

to check this: open

thumb_resize.php

find

Code: Select all

 function save($filename, $image_type=IMAGETYPE_PNG, $permissions=null)
replace with

Code: Select all

   function save($filename, $image_type=IMAGETYPE_JPEG, $permissions=null)
delete all existing files in images/last_x_att, load-up edited thumb_resize.php again and clear all board- and browser-caches.

This increase the performance of showing thumbs (bcs. it makes them 4-5 times smaller)
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] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

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..
Last edited by 4_seven on Sat Feb 13, 2010 5:21 pm, edited 3 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] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

Update added (see first post for download link)

-----------------------

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
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] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

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
Current Mods | Mod Base | php(BB) programming | No help via PM
fairylaw
Registered User
Posts: 43
Joined: Sat Apr 11, 2009 5:12 am

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by fairylaw »

I have installed this mod and it works great except that it does not resize the thumbnails to all the same size they are all different sizes. what do i need to do to fix this.

http://fairylaw.net

thanks in advance
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

i think u change the height testwise and dont delete the files in folder images/last_x_att after change settings. so delete all files in folder images/last_x_att and let rebuild the thumbs.
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] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

[DEV] Announcement v.0.0.5

In the next time i make a general-update for this mod.

v.0.0.5 than will work with the new "Last X [img]"-Engine:
http://www.phpbb.com/community/viewtopi ... &t=1953985

- more efficient
- slimmer code
- crawl and normal mode in one file
- auto-delete of orphaned thumbs
- double dead-link check (so no 'hangs' or errors anymore)
- "mix" size-option: squares the pic to exact fit (if not squared allready)
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
paulnicholson
Registered User
Posts: 230
Joined: Thu Jun 04, 2009 9:04 pm
Location: Australia
Contact:

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by paulnicholson »

How can I make the images scroll ABOVE my sidebar?

Why are the images skipping slowly? It's not smooth.

How can I change the number of images?

Why does it work in the index and portal, but not the forums?

Why does it say Last 12 Attachments in Forum
Crawl Script - Calculated on your Screen Resolution of 1073x805
and how do I get rid of it?

How can I change the config? It doesn't change.
http://www.theatrenet.com.au
Last edited by paulnicholson on Thu Apr 01, 2010 8:14 pm, edited 1 time in total.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by 4_seven »

How can I make the images scroll ABOVE my sidebar?
just put it in the template above the sidebar. i dont know your style, but i think in overall_header.html
Why are the images skipping slowly? It's not smooth.
its the smoothest script in web. all what can be, is that your server is in traffic (means server, not forum, bcs of eg. shared server)

look on my testforum, it works finest smooth with this settings in template-script
(this is a question of taste)
inc: 4, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 1,
neutral: 600,
savedirection: false
How can I change the number of images?
in both files..

last_x_attachments_on_forum_crawl.php
last_x_attachments_on_forum.php

..u find all possible settings:

Code: Select all

//---------SETTINGS------------------------------------------------------

xxxxxxxxxxxxxxxxxxxxxx

//---------SETTINGS------------------------------------------------------
Why does it work in the index and portal, but not the forums?
in install.txt u find all possible install-instructions, also for viewforum.php and its template etc.
Why does it say Last 12 Attachments in Forum
Crawl Script - Calculated on your Screen Resolution of 1073x805
and how do I get rid of it?
its an information display

if no need: just delete this part in template
<hr style="height:1px; border-color:white;" />
<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 -->
may also the (now) unneeded line

also u can replace the last part with this
<!-- 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 -->
for people, which have no javascript enabled. no one see it .. if javascript is enabled
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
paulnicholson
Registered User
Posts: 230
Joined: Thu Jun 04, 2009 9:04 pm
Location: Australia
Contact:

Re: [DEV] Last X [attachments] on Forum v.0.0.4

Post by paulnicholson »

How can I make the images scroll ABOVE my sidebar?



just put it in the template above the sidebar. i dont know your style, but i think in overall_header.html
milky way style. i dont know what to do still.
look on my testforum, it works finest smooth with this settings in template-script
(this is a question of taste)

inc: 4, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 1,
neutral: 600,
savedirection: false
I don't know what you mean by template-script. Which file? What lines do I change please?
Locked

Return to “[3.0.x] Abandoned MODs”