BBCodeBox3

prosilver | subsilver2

Willkommen und Gute Nacht, Guest  Beim nächsten Piep ist es zwischen 0:00 und 1:00 Uhr

It is currently Sun 23. Feb 2025, 01:27

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: Mon 1. Feb 2010, 15:44 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

Real Remote [img] Resize

   80%

MOD-Title: Real Remote [img] Resize
MOD-Version: 0.0.2
MOD-Author: 4seven

MOD-Description: This Mod replaces [img] remote pics with true resized thumbs of given size

MOD-Demo: http://4seven.bplaced.net/forum/media/v ... f=13&t=219
UN: tester
PW:tester


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

Image (follows)

Download: http://4seven.bplaced.net/forum/6test/v ... f=3&t=372&

Instruction: viewtopic.php?p=1532&f=8#p1532

Features:
- thumbing of posted external site [img]
- true resize, no javascript client resize, that makes [img]'s only optically smaller
- thumbs storing on your own server
- screen-mode (published) and base-mode (unpublished)
- don't effects allready local stored [img]'s
- thumb output width is adjustable, to have perfect forum fit
- so [img]'s works in harmony with given [attachment]'s max width
- also no minuted remote linking and stolen bandwidth
- optional highslide in screen-mode with link-zoom to original-pic

Requirements: fopen()

Quote:
Explanations

Screen-Mode:
- remote-pics are copied to given folder, resized and displayed with local-link
- local filenames are converted to mixed md5
- optional highslide-mode with link-zoom to origin-pic
- by edit u see the origin remote-link
- by review-reply ore quote u see the transformed local-link
- works in all areas: search, viewtopic, posting
- no update to database

Description:
- remote pics have the perfect size, so the forum have the exact fit
- pics are truly physical resized, not only client-sided (eg. with java)
- pics are stored on your own server (which makes the forum faster)
- no more worry about dead-links



The Working Mode:
- even if a topic-site turn to the next site or "it is full" a button appears, that is normally 'admin-only':
[Convert [img] on this page] http://4seven.bplaced.net/forum/media/v ... f=13&t=219
- wait a little, then all remote-img will be converted
- after that the [Delete converted [img]] button appears so u can delete all pics on this topic-site to eg. update edited pics
- when u edit your img-post (or from others, with given rights) u see the origin remote-link
- when u review-reply or quote the img-post, it transforms automatically the (hidden) remote-link to the local-link and filename
- from now on the script ignore this quoted img-post, bcs. it have allready local-links
- local img-links will be strictly ignored




Planned:
- ACP??

Notes:
- No display of protected remote pics


Top
 Profile  
 
PostPosted: Mon 26. Apr 2010, 23:28 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

Instruction

Real Remote [img] Resize v.0.0.2



download package



make shure u enter all settings in includes/real_remote_img_resize_config.php before u ask anything

Code:
//------------SETTINGS--------------
//----------------------------------
// turn the mod on/off
$real_img_on_off_scr = 'on';
// enter as given: 'on' or 'off'
//----------------------------------
// make the setting, if you desired width or height here
$width_or_height_rem_scr = 'width';
// width makes absolute more sense ;)
//----------------------------------
// make the setting of thumb-size in px here (counts for width or height)
$convert_max_size_rem_scr = 400;
// fit it to your forum design ;)
//----------------------------------
// if this feature is set to 'yes', the origin pic is open with highslide
$real_convert_highslide_scr = 'no';
// enter as given: 'yes' or 'no'
//----------------------------------
// enter here the forum id's to thumbing  
$affected_real_img_scr    = array(7,8,9); 
// enter as given: (7,8,9) 
//------------------------------------
//-------------SETTINGS---------------                       




copy all files from root/*.* to /*.*



make folder images/post_thumbs and give chmod 777 to it



open

search.php

Code:
        'U_SEARCH_WORDS'    => $u_search,
    ));


after add

Code:
        // Real Remote [img] Resize / Screen Version / 4seven / 2010 
        include($phpbb_root_path . 'includes/real_remote_img_resize_config.' . $phpEx);
        // Real Remote [img] Resize / Screen Version / 4seven / 2010           


find

Code:
                $row['post_text'] = censor_text($row['post_text']);


after add

Code:
                // Real Remote [img] Resize / Screen Version / 4seven / 2010    
                include($phpbb_root_path . 'includes/real_remote_img_resize_screen_search.' . $phpEx);
                // Real Remote [img] Resize / Screen Version / 4seven / 2010                            




open

posting.php

find

Code:
$post_data['post_text'] = $message_parser->message;


after add

Code:
// Real Remote [img] Resize / Screen Version / 4seven / 2010    
 if ($mode !== 'edit'){
 include($phpbb_root_path . 'includes/real_remote_img_resize_config.' . $phpEx);
 include($phpbb_root_path . 'includes/real_remote_img_resize_screen_posting.' . $phpEx);}
// Real Remote [img] Resize / Screen Version / 4seven / 2010                            




open

viewtopic.php

find

Code:
// Output the posts
$first_unread = $post_unread = false;


before add

Code:
// Real Remote [img] Resize / Screen Version / 4seven / 2010    
include($phpbb_root_path . 'includes/real_remote_img_resize_config.' . $phpEx);
// Real Remote [img] Resize / Screen Version / 4seven / 2010                              


find

Code:
    $message = censor_text($row['post_text']);


after add

Code:
    // Real Remote [img] Resize / Screen Version / 4seven / 2010    
    include($phpbb_root_path . 'includes/real_remote_img_resize_screen_view.' . $phpEx);
    // Real Remote [img] Resize / Screen Version / 4seven / 2010                             




open

includes/functions_posting.php

find

Code:
    for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)


before add

Code:
    // Real Remote [img] Resize / Screen Version / 4seven / 2010    
    include($phpbb_root_path . 'includes/real_remote_img_resize_config.' . $phpEx);
    // Real Remote [img] Resize / Screen Version / 4seven / 2010                        


find

Code:
            $decoded_message = bbcode_nl2br($decoded_message);


after add

Code:
            // Real Remote [img] Resize / Screen Version / 4seven / 2010    
            include($phpbb_root_path . 'includes/real_remote_img_resize_screen_posting_review.' . $phpEx);
            // Real Remote [img] Resize / Screen Version / 4seven / 2010                            


find

Code:
        $template->assign_block_vars($mode . '_row', array(


before add

Code:
            // Real Remote [img] Resize / Screen Version / 4seven / 2010    
            include($phpbb_root_path . 'includes/real_remote_img_resize_screen_post_review.' . $phpEx);
            // Real Remote [img] Resize / Screen Version / 4seven / 2010                        




open

styles/prosilver/template/viewtopic_body.html

find

Code:
    <!-- IF PAGINATION or TOTAL_POSTS -->
      <div class="pagination">


after add

Code:
    <!-- IF U_ACP -->            
        
<!-- IF S_CONVERT_FALSE -->
        <br />
        <form action="convert">
        <fieldset>
        <!-- IF S_CONVERT_TRUE -->
        <input class="button2" type="button" value="Delete converted [img]" onclick="location='{DELETE_LINK}'" />
        <!-- ELSE -->
        <input class="button2" type="button" value="Convert [img] on this page" onclick="location='{CONVERT_LINK}'" />
        <!-- ENDIF -->
        </fieldset>
        </form>
        <br />
        <!-- ENDIF -->
    <!-- ENDIF -->




open

styles/subsilver2/template/viewtopic_body.html

find (the first find)

Code:
            <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
        <!-- ENDIF -->


after add

Code:
            <td class="gensmall" nowrap="nowrap">
        <!-- IF U_ACP -->                
            
<!-- IF S_CONVERT_FALSE -->
            <form action="convert">
            <fieldset>
            <!-- IF S_CONVERT_TRUE -->
            <input class="btnbbcode" type="button" value="Delete converted [img]" onclick="location='{DELETE_LINK}'" />
            <!-- ELSE -->
            <input class="btnbbcode" type="button" value="Convert [img] on this page" onclick="location='{CONVERT_LINK}'" />
            <!-- ENDIF -->
            </fieldset>
            </form>
            <!-- ENDIF -->
        <!-- ENDIF -->
            </td>


Top
 Profile  
 
PostPosted: Tue 27. Apr 2010, 01:08 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

Higshlide Support

upload from package

root/highslide/*.* to highslide/*.*

open

styles/xxxxx/template/overall_header.html

find

Code:
<head


before add

Code:
<script type="text/javascript" src="highslide/highslide.js"></script>
<link rel="stylesheet" type="text/css" href="highslide/highslide.css" />
<script type="text/javascript">
    // override Highslide settings here
    // instead of editing the highslide.js file
    hs.graphicsDir = 'highslide/graphics/';
</script>


Top
 Profile  
 
PostPosted: Tue 27. Apr 2010, 03:20 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

Tip

If u get a memory_limit error bcs. of too big remote-pics (limits by server) try the following

open

.htaccess

enter at the begin

Code:
php_value memory_limit 128M


This will work for pics ~ 3000 x 3000 px

or

Code:
php_value memory_limit 144M


This will work for pics ~ 4200 x 4200 px


Reduce or increase slowly in 4M Steps.

-----------

To check out how high u can go make a file memory.php

Code:
<?php
$y
=ini_get('memory_limit');
echo $y;
?>


and call the file in browser.

> increase the .htaccess higher as this file displays make no sense
> in this case reduce slowly till the summery change


Top
 Profile  
 
PostPosted: Wed 26. Aug 2015, 01:02 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

reminder:
fixing download links


Top
 Profile  
 
PostPosted: Wed 25. May 2016, 22:06 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

NOTE

For some reasons

Code:
phpbb_chmod() 

don't work

so open

real_remote_img_resize_screen_view.php

and find

Code:
phpbb_chmod($rem_clr_path2, CHMOD_READ | CHMOD_WRITE); 

and replace with

Code:
//phpbb_chmod($rem_clr_path2, CHMOD_READ | CHMOD_WRITE); 
chmod($rem_clr_path2,0755); 


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
POWERED_BY
[ Time : 0.019s | 23 Queries | GZIP : Off | Board-Version: 3.0.7 PL1 ]