[ABD] Last X [img] on Forum v.0.0.2

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.
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

I guess I am a little confused at what images it is actually getting because it is taking every image that has been posted. Anyways I look forward to the update. I hope it has an option to include only the first image of each topic.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

iamthestreets wrote:it is taking every image that has been posted.
Exact, it takes the last (or latest) x posted img from settable forum ids for displaying and the count of x is configurable in config area of mod. Thats the base intention. But, as i say, i give the desired workmode as contrib in next version, so the name of the mod must not changed, bcs. if it work the desired way, it takes not the last (latest) x img from a forum anymore, but the last from each topic in this forum and those img can be weeks, months or years old.
Current Mods | Mod Base | php(BB) programming | No help via PM
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

I understand now, thanks. Is there a way to stop the scroll and only have the images scroll when you put your mouse on the left or right side?
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

i take a look, if its possible.
Current Mods | Mod Base | php(BB) programming | No help via PM
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

Do you know if thats possible? I also have another question. I set my number of max pics to show at 11 but it is showing over 50 pics. Did I do something wrong?
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

if you want to force the number of display, set java detection to off in config area.
Current Mods | Mod Base | php(BB) programming | No help via PM
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

I set it to no and it's still showing more images than I set to display.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

after each change in config you have to delete all thumbs. make shure you clear all available board- and browser-caches and (strg + f5) before you visit your site again.
Current Mods | Mod Base | php(BB) programming | No help via PM
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

I hope i'm not bother you to much, but I did everything you said to do and it is nothing has changed.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

v.0.0.2

includes/last_x_img_on_forum.php

you have it in config area exactly as here?

Code: Select all

// detect screen resolution  of user via java
// (if anything is disfunction by detection, turn it to: no)
$detect_img_java_screen  = 'no';
// enter as given_ yes or no
//----------------------------------
// number of max pics to show 
// (important if user have no javacript enabled or $detect_java_screen  is set to 'no';)
$max_img_to_show  = 11;
// enter as given 9 or 12 etc.  
you have delete all thumbs,
cleared all available board- and browser-caches
and (strg + f5) your browser
before you visit your site again
after that?

if yes with no result, i have no clue.
Current Mods | Mod Base | php(BB) programming | No help via PM
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

yes, it is all set like that and it still doesn't work.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

4_seven wrote:if yes with no result, i have no clue.
so i cant do anything.
Current Mods | Mod Base | php(BB) programming | No help via PM
iamthestreets
Registered User
Posts: 244
Joined: Fri Feb 24, 2012 4:35 pm

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by iamthestreets »

thanks. if anyone figures this our please let me know.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by 4_seven »

never heard about that behaviour, so the only chance from the scratch is to test out the following

first

check again that these entrys are set this way in

includes/last_x_img_on_forum.php

Code: Select all

// detect screen resolution  of user via java
// (if anything is disfunction by detection, turn it to: no)
$detect_img_java_screen  = 'no';
// enter as given_ yes or no
//----------------------------------
// number of max pics to show 
// (important if user have no javacript enabled or $detect_java_screen  is set to 'no';)
$max_img_to_show  = 11;
// enter as given 9 or 12 etc.      
then find (same file)

Code: Select all

if ($detect_img_java_screen == 'yes'){

if (!request_var('w', '', true)){

echo "<script language='javascript'>\n";
echo "  location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}"
 . "&w=\" + screen.width + \"&h=\" + screen.height;\n";
echo "</script>\n"; 

$convert_real_img_size = $max_img_to_show;

$template->assign_vars(array(
'NUMBER_OF_SHOWN_IMG' => $convert_real_img_size));}

else if (request_var('w', '', true)){

if ($img_width_o_height == 'mix'){
if ($crawl_img_o_not == 'no'){
$convert_real_img_size = round(request_var('w', '') / ($convert_mx_size*1.2));}
else{
$convert_real_img_size = round(request_var('w', '') / ($convert_mx_size*0.7));}
}
else if ($img_width_o_height == 'width'){
if ($crawl_img_o_not == 'no'){
$convert_real_img_size = round(request_var('w', '') / ($convert_mx_size*1.3));}
else{
$convert_real_img_size = round(request_var('w', '') / ($convert_mx_size*0.65));}
}
else{
if ($crawl_img_o_not == 'no'){
$convert_real_img_size = round(request_var('w', '') / ($convert_mx_size*1.8));}
else{
$convert_real_img_size = round(request_var('w', '') / ($convert_mx_size*0.9));}
}

$template->assign_vars(array(
'S_NO_IMG_JAVA_PRESENT'      => request_var('w', '', true),
'NUMBER_OF_SHOWN_IMG'        => $convert_real_img_size,
'SCREEN_IMG_WIDTH'           => request_var('w', ''),
'SCREEN_IMG_HEIGHT'          => request_var('h', '')));
}

$template->assign_vars(array(
'S_NO_IMG_JAVA_DETECTION' => true
));}

else{
$convert_real_img_size = $max_img_to_show;

$template->assign_vars(array(
'NUMBER_OF_SHOWN_IMG'     => $convert_real_img_size,
'S_NO_IMG_JAVA_DETECTION' => false
));} 
replace with

Code: Select all

$convert_real_img_size = $max_img_to_show;

$template->assign_vars(array(
'NUMBER_OF_SHOWN_IMG'     => $convert_real_img_size,
'S_NO_IMG_JAVA_DETECTION' => false
));
load up the named file

delete all thumbs in

images/last_x_img/*.*

clear all board- and browser-caches and strg+f5 your browser and report, whats happen.
Current Mods | Mod Base | php(BB) programming | No help via PM
Jabhi
Registered User
Posts: 572
Joined: Mon Feb 27, 2012 6:12 am

Re: [DEV] Last X [img] on Forum v.0.0.2

Post by Jabhi »

I got like this.
Image

the frame is not correctly placed in below portion. And is not scrolling to left side...
Go phpBB go... Respected : Developers, Supporters.

Return to “[3.0.x] Abandoned MODs”