Warning: The author of this contribution does not provide support for it anymore.

ReIMG Image Resizer

ReIMG in custom page - ReIMG Image Resizer

ReIMG in custom page

by ALX™ » Sun Feb 08, 2015 2:43 pm

Can I add the function of ReIMG on a custom page? (As simple as possible)
Thanks
Forgive me for my bad english :oops:
User avatar
ALX™
Registered User
Posts: 224
Joined: Thu Jun 26, 2014 4:47 pm
Contact:

Re: ReIMG in custom page

by DavidIQ » Sun Feb 08, 2015 3:07 pm

Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17163
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: ReIMG in custom page

by ALX™ » Mon Feb 09, 2015 5:28 pm

Code: Select all

<?php
define('IN_PHPBB', true);
define('LOAD_REIMG', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

page_header('events&gifts');

$template->set_filenames(array(
    'body' => 'events_body.html',
));

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>


Some like this? I made it but not work. :?
Forgive me for my bad english :oops:
User avatar
ALX™
Registered User
Posts: 224
Joined: Thu Jun 26, 2014 4:47 pm
Contact:

Re: ReIMG in custom page

by DavidIQ » Mon Feb 09, 2015 6:30 pm

And what exactly is in events_body.html?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17163
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: ReIMG in custom page

by ALX™ » Mon Feb 09, 2015 7:38 pm

It is a new page. I have not finished yet. Ι do tests to see if the pictures and text will appear correctly
Sorry for my bad english

Code: Select all

<!-- INCLUDE overall_header.html -->

<h2>Tα events και τα δώρα του facebike.gr</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      <p>
         
         Στα 2 χρόνια λειτουργίας του
<img src="http://www.facebike.gr/images/smilies/Ordinary%20Smilies/logo_site_perigram26X96.png"> έχουμε πραγματοποιήσει αρκετά event από τα οποία κάποια μέλη μας κέρδισαν ένα ή περισσότερα δώρα!
         
         Κάποια από αυτά ήταν:
         <ul>
            <li>Η κοπή της πρώτης μας πίτας τον Φεβρουάριο του 2014</li>
            <li>Το παιχνίδι του Motogp Manager του 2014</li>
            <li>Το event των kart στην πίστα του Ασπρόπυργου</li>
         <li>H κοπή της δεύτερης πίτας μας τον Ιανουάριο του 2015</li>
         </ul>
       Η πρώτη μας πίτα κόπηκε στο Occasions παρουσία αρκετών μελών και φίλων του φόρουμ.
       <p>
       
<img src="https://dl.dropboxusercontent.com/u/16310833/Gia%20facebike/Pita2014/IMG_9012%20%28Large%29.JPG" alt="some_text"> <img src="https://dl.dropboxusercontent.com/u/16310833/Gia%20facebike/Pita2014/IMG_9047%20%28Medium%29.JPG" alt="some_text"> <img src="https://dl.dropboxusercontent.com/u/16310833/Gia%20facebike/Pita2014/IMG_9058%20%28Medium%29.JPG" alt="some_text">       
      </p>
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
Forgive me for my bad english :oops:
User avatar
ALX™
Registered User
Posts: 224
Joined: Thu Jun 26, 2014 4:47 pm
Contact:

Re: ReIMG in custom page

by DavidIQ » Mon Feb 09, 2015 7:53 pm

This isn't really going to get processed by phpBB's template engine so you'll need to add this to every image you want to resize:

Code: Select all

class="reimg" onload="reimg(this)" onerror="reimg(this)"

This process is greatly simplified in 3.1 but for 3.0 it's what needs to be done.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17163
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: ReIMG in custom page

by ALX™ » Tue Feb 10, 2015 4:09 pm

It works! Thanks! :D
The style I have chosen (absolution) has not been upgraded to 3.1.
The absolution developer, has disappeared from phpbb and I don't know if he upgrade this style.
The same and the board3 portal.
Forgive me for my bad english :oops:
User avatar
ALX™
Registered User
Posts: 224
Joined: Thu Jun 26, 2014 4:47 pm
Contact: