4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Nicky on September 01, 2002, 10:06:28 PM
-
used / benutzt wurde 4images 1.7 & phpBB 2.0.2
E:
NOTE: this mod will work ONLY if your 4images mysql tables are in SAME DATABASE like phpBB.
D:
ACHTUNG: dieser mod funktioniert NUR wenn 4images mysql tabellen in GLEICHER DATENBANK sind wie die von phpBB.
1.
open / öffne
includes/page_header.php
search / suche
$template->assign_vars(array(
add before / vor dem füge dies
http://www.nicky.net/4images/random_for_phpBB.txt
in mod self change if necessery / im mod selbst ändere wenn notwendig
// Set here the URL to your 4images Gallery. WITH trailing slash!
// Set here your THUMBNAIL directory. Normally no need to change. WITHOUT trailing slash!
// In following queries CHANGE 4images table PREFIX if it doesn't match (Standard "4images_")!
search again for (same file) / such nochmals nach (gleiche datei)
$template->assign_vars(array(
add after / nachdem füge dies
'R_RANDOM_PIC' => $randompic,
now you can use {R_RANDOM_PIC} in every phpBB template
jetzt kannst du {R_RANDOM_PIC} in jedem phpBB template benützen
2.
if you want to have the random pic only on your phpBB main page, then put the code into index.php & template index_body.tpl. (don't use it in includes/page_header.php!)
wennst willst das zufallsbild nur auf der phpBB startseite erscheint, dann füge den code nur in der index.php & template index_body.tpl. (benutze es dann nicht in der includes/page_header.php!)
that's it.... have fun
das ist alles.... viel spass
-
Bei mir klappt es irgendwie nicht!
könnt ihr bitte mal nachschauen?
DIe Adresse hab ich angegeben, aber irgendwie steht da kein Bild-ID zum Schluss, somit auch kein richtiger Link!!! :roll: :roll:
-
hast du auch richtiges PREFIX in den queries berücksichtigt ?
-
Jep, ich hab die Standardprefixe benutzt!!!
phpbb_ bzw. 4images_
aber vielleicht sollte ich noch dazu sagen, dass die Benutzerdaten in das Forum mit intergriiert sind!!!
-
okay,
wo kann ich dies sehen ?
-
www.vahid.de/phpbb2
bzw.
www.vahid.de/images
-
okay, der fehler liegt nicht bei mir *g*
kann nicht funktionieren wenn du keine ansicht der grossen bildern zulassen tust, deshalb wird auch keine image_id übergeben..
ausserdem,
tust du gegen nutzungsbedingungen verstossen
richtiges code für footer.html
<p align="center">
Powered by <b>4images</b> {script_version}
<br />
Copyright © 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</p>
und da du auch die VIERSTRA templates benutzten tust, sollte auch sein link drinnen sein..
bitte wieder ändern..
danke..
-
sorry, j0 mach ich rein, aber ICH persönlich hab es nicht raus genommen, wir sind 3 Admins, werd es den anderen auch sagen, dass sie das drin lassen sollen.
Wie kann ich den die Zulassung ändern, damit die Vergrößerung angezeigt wird?
und vielen Dank
-
wie ich sehe, wird das bild jetzt dargestellt...
nur, meine bitte wurde nicht erfüllt ;)
-
Hi just wanted to know if its possible
On the Index page of phpbb i want the last 3 or 4 new image thumbnails to be shown ,how do i do this :?:
giffy
-
hi giffy,
i just did it ...
you can see it at http://www.modellspielzeug.at/forum/
are the last 4 added images
is that what you want..?
-
Yes thats great how can i do that !
thanks
giffy
-
hi giffy,
same instruction like the random pics for phpBB
http://www.nicky.net/4images/new_pics_for_phpBB.txt
instead of:
'R_RANDOM_PIC' => $randompic,
use
'N_NEW_PIC' => $newpics,
use {N_NEW_PIC} in template
and look for:
// Set thumbnails to show
$new_thumbs = 4;
-
Ok done what you said but no thumbs appear ,
I cannot find this ( and look for: // Set thumbnails to show $new_thumbs = 4;
Where is this ?
giffy
-
hi giffy
hmm are you using this ?
http://www.nicky.net/4images/new_pics_for_phpBB.txt
or the code from my first post
-
Hmm lol no , where did that come from :oops:
giffy :wink:
-
http://www.4homepages.de/forum/viewtopic.php?p=7894#7894
;)
-
Yes i tried that , still didnt work :cry:
Just getting ( nothing here )
I try a few things and get back to you
Ok still doesnt work , just getting the words ( nothing here )
What can i do now ? ive tried other templates and still the same ?
Ive corrected the url and prefixes no joy !!!
giffy
-
where can i see it ?
and where is 4images install ?
-
Ok still doesnt work , just getting the words ( nothing here )
What can i do now ? ive tried other templates and still the same ?
Ive corrected the url and prefixes no joy !!!
giffy
this two things in query must match
AND b.auth_viewcat=0
AND b.auth_viewimage=0
if you have a secret gallery, query will return "nothing here"
because the two "0" are for all pics where user/guest can access a category a can click on a thumb to view the large pic..
-
Ok found it , yes i have it set up to have only reg members to view so i changed this
AND b.auth_viewcat=0
AND b.auth_viewimage=2
and it works , they can only see the main image if logged in.
Question can i point them to a page if they are not logged in ??? in this mod !!!
A question
How can i format these thumbs ?
I want it so the thumbs appear in 2 colums and 4 rows .
Can i get to open a new window when they click on the thumbs ?
Once thanks for your help Nicky :wink:
Giffy
-
Just to say you thank you !!! for this mod (^_^)
I'm your fan ;)
-
Great mod but how can add 4images category list along with new images in phpbb?
regards
-
ich weiß zwar nicht wieso, aber der will den thumbnail immer in folgender url suchen:
http://www.myhomepage.com/phpbb/4images/thumbs/1/picture.jpg
das kann ja nicht sein, im overall header habe ich immernochdefine('THUMB_DIR', 'data/thumbnails');
stehen.
weiß einer wieso der das falsch verlinkt ?
-
wie man hier (http://surotho.com/phpBB2plus/portal.php) schön sehen kann ist mein random pic irgendwie falsch verlinkt. hat da einer ne idee, wie ich das ändern muß, damit der den link auch richtig erstellt ?
-------
what do i have to change, that the link of the random-pic is generated correctly ? look here (http://surotho.com/phpBB2plus/portal.php), its linking to a false directory !
-
hi, I'm new!
Thx for a great mod!
I have followed the description about how to ad the mod http://www.nicky.net/4images/new_pics_for_phpBB.txt into the includes/page_header.php in phpBB directory.
I saved the file, uploaded it, and everything should be fine, if I understand the procedure correctly, then I have to mod the selected template as well, cause no picture shows up as it is. The gallery and the forum are using the same database, the links and table PREFIX are ok too.
The question is, which template file should I edit to get the same result as in: http://www.modellspielzeug.at/forum/ ?
Does anyone know a good wysiwyg editor for templates like to 4images and phpBB? I will get into editing and designing from code, but it could help to see how's a program is changing the files, then I will get into the understanding on how it works quicker.
thx for your time.
-
wirklich keiner ne idee, warum bei mir das random pic falsch generiert wird ? nur das bild wird falsch generiert, name und kommentare werden ja angezeigt.
-
Hi friends,
I am testing the this mod, everything seems to be OK except that the thumbnails did not appear.
My thumb Dir is "html/album/data/thumbnails"
and I kept the Thum_Dir in the code unchanged (data/thumbnails)
When I right click at the thumbnail position of the radom image at phpBB page I got this:
... album/thumbs/x/XXX.jpg
What I have to do to point the thumnail Dir to the right place??
Thank you for your early reply!
-
wie man hier (http://surotho.com/phpBB2plus/portal.php) schön sehen kann ist mein random pic irgendwie falsch verlinkt. hat da einer ne idee, wie ich das ändern muß, damit der den link auch richtig erstellt ?
-------
what do i have to change, that the link of the random-pic is generated correctly ? look here (http://surotho.com/phpBB2plus/portal.php), its linking to a false directory !
My problem is exactly the same to THIS, can anyone provide us some help??
Thankx in advance!!
-
did u change?
define('THUMB_DIR', 'data/thumbnails');
-
V@no,
I tested two options:
1- I kept it unchanged ('data/thumbnails')
2- I changed it to ('home/krvn/html/album/data/thumbnails')
But none of them work. The album folder is the Root folder for 4images.
My phpBB and 4images are in the same database.
whatever the
define('THUMB_DIR', 'data/thumbnails'); is changed to, I got the random image thumnails like this:
http://www.krvn-online.net/album/thumbs/xx/xxx.jpg
(right mouse click on the thumb image, then select "property" I got that link)
I guess the problem must be somethings else.
I would appreciate your quick help!
here is the code
// START RANDOM PIC MOD
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: none *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* MOD for 4images 1.7 & phpBB 2.0.2 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* 4images ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (http://www.4homepages.de/4images/lizenz.php) für *
* weitere Informationen. *
* --------------------------------------------------------------- *
* 4images is NOT freeware! Please read the Copyright Notice *
* (http://www.4homepages.de/4images/lizenz_e.php) for further *
* information. *
* *
*************************************************************************/
// Set here the URL to your 4images Gallery. WITH trailing slash!
define('SCRIPT_URL', 'http://www.krvn-online.net/album/');
// Set here your THUMBNAIL directory. Normally no need to change. WITHOUT trailing slash!
define('THUMB_DIR', 'home/krvn/html/album/data/thumbnails');
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
// In following queries CHANGE 4images table PREFIX if it doesn't match (Standard "4images_")!
$sql = "SELECT COUNT(*) as total_images
FROM 4images_images a, 4images_categories b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=0
AND b.auth_viewimage=0
";
if ( !($result = $db->sql_query($sql)) )
{
return false;
}
$row = $db->sql_fetchrow($result);
$total_images = $row['total_images'];
mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
FROM 4images_images a, 4images_categories b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=0
AND b.auth_viewimage=0
LIMIT $number, 1";
if ( !($result = $db->sql_query($sql)) )
{
return false;
}
$row = $db->sql_fetchrow($result);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
$randompic = "<a href=\"".SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br />Image Name: $image_name<br />Comments: $image_comments\n";
// HAVE FUN
// END RANDOM PIC MOD
-
it doesnt sound right.
first, the THUMB_DIR is relative to SOURCE_DIR, that means, that the link created by combiing those two variables.
so, u can not use absolute path to THUMB_DIR.
if u dont have any thumbnails that are located on remote server (not phisicaly uploaded to your server, but just used link to it), then u can just delete the remote "detector":
Replace:$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
with:$thumb_src = SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
P.S. define('THUMB_DIR', 'data/thumbnails'); is correct dont change it, leave it as it is.
-
Thanks for your effort V@no,
But still did not work, the thumbnails is still not showing and the same as before:
http://www.krvn-online.net/album/thumbs/xx/xxx.jpg
while the correct path is:
http://krvn-online.net/album/data/thumbnails/xx/xx.jpg
Could you pliz look for any other solution,
thanks once again, and have anice weekend!!
-
define('THUMB_DIR', 'data/thumbnails');
$thumb_src = SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
$randompic = "<a href=\"".SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br />Image Name: $image_name<br />Comments: $image_comments\n";
Do you think that the problem araised from the red-colored text??
-
well...
and what path it shows when u change that define('THUMB_DIR', 'data/thumbnails'); ?
if it's trying pull images from the same path even that this was changed, then maybe your host use some caching? :? (just a stupid thought)
-
hi v@no,
I got it worked!!!
Here is what I did.
First, I guessed that 'THUMB_DIR' may have been used and defined as ('THUMB_DIR', 'thumb') in other parts of page_header.php.
Second, I changed:
define('THUMB_DIR', 'data/thumbnails');
To
define('THUMB_DIRS', 'data/thumbnails');
And I changed
$thumb_src = SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
To
$thumb_src = SCRIPT_URL.THUMB_DIRS."/".$cat_id."/".$row['image_thumb_file'];
And now, it works, you can check it out here: http://www.krvn-online.net
V@no, Thanks for your helps, I'll be back sometimes!
-
hehe,very strange ?!?!? now it works on my page too !
-
same here, got it worked with "S"
by the way, can I specify a category/sub-category not show in random pic?
-
where is "$template->assign_vars(array(" ?
I can't find it in 1.7.
-
^^If i am not wrong you have to find this line in PHPBB includes folder.
-
Hallo,
ich habe das Problem, das die thumbnails im phpbb Portal bei mir nicht angezeigt werden :(
(http://www.gibsy.com/dim/gibsy_files/Bild1.gif)
und hier mein code bei page_header.php
// START RANDOM PIC MOD
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: none *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* MOD for 4images 1.7 & phpBB 2.0.2 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* 4images ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (http://www.4homepages.de/4images/lizenz.php) für *
* weitere Informationen. *
* --------------------------------------------------------------- *
* 4images is NOT freeware! Please read the Copyright Notice *
* (http://www.4homepages.de/4images/lizenz_e.php) for further *
* information. *
* *
*************************************************************************/
// Set here the URL to your 4images Gallery. WITH trailing slash!
define('SCRIPT_URL', 'http://www.gibsy.com/dim/4images');
// Set here your THUMBNAIL directory. Normally no need to change. WITHOUT trailing slash!
define('THUMB_DIR', 'http://www.gibsy.com/dim/4images/data/thumbnails');
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
// In following queries CHANGE 4images table PREFIX if it doesn't match (Standard "4images_")!
$sql = "SELECT COUNT(*) as total_images
FROM 4images_images a, 4images_categories b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=0
AND b.auth_viewimage=0
";
if ( !($result = $db->sql_query($sql)) )
{
return false;
}
$row = $db->sql_fetchrow($result);
$total_images = $row['total_images'];
mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
FROM 4images_images a, 4images_categories b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=0
AND b.auth_viewimage=0
LIMIT $number, 1";
if ( !($result = $db->sql_query($sql)) )
{
return false;
}
$row = $db->sql_fetchrow($result);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
$randompic = "<a href=\"".SCRIPT_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br />Bild Name: $image_name<br />Kommentare: $image_comments\n";
// HAVE FUN
// END RANDOM PIC MOD
alle Kategorien sind auf Registrierung gestellt bis auf eins und nur dieser zeigt an aber auch nur als Link, es müsste doch alle Kategorien Ordner anzeigen mit thumbnails da bei mir 4images mit phpbb integriert wurde!
Aber zuerst das Problem das die thumbnails nicht anzeigen, siehe Bild oben.
Ich wäre über Eure hilfe und vorschläge sehr dankbar.
by Gibsy
-
Hallo,
Code in der page_header.php? Ist das richtig ??
Schau mal hier:
http://www.4homepages.de/forum/index.php?topic=1020.0 (http://www.4homepages.de/forum/index.php?topic=1020.0) :wink:
cu
Kurt
-
Code in der page_header.php? Ist das richtig ??
Ja, so hat Nicky in seinem ersten Beitrag geschrieben :wink:
-
Hallo Nicky,
would it be possible to make a link to member´s fotos in phpbb-member profile, like url_show_user_images in 4images member profile? Many thanks.