4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: zakaria666 on August 01, 2010, 05:05:00 PM
-
I dont understand what the problem is :cry:
Basicailly, when user logs out of 4images, there are no RANDOM pictures being displayed on the left of the screen. Actually no images what so ever are being displayed on the front of the 4images user interface.
example go on VANO's website http://4images.vano.org/ajaxcomments/index.php
he has images displayed on the front, new images, etc and even on the top images things are displayed. But for me when user is logged in then things are displayed, when user is not logged in nothing is displayed on front screen, its completly dead?
this is what is says on the front screen...
Categories
No categories found.
0 images in 0 categories.
New images
Currently there are no new images.
Currently active users: 1
There are currently 0 registered user(s) (0 among them invisible) and 1 guest(s) online.
what may be the problem?
thanks
-
Two words: category permissions
If you set "view category" or "view images" permissions to anything other then "guest", then guests will not be able see the categories/images.
-
dude uuuuuuuu r a genius, i dont understand how did u even know that was the problem. U r so amazing bro,..
Sir u r a bloody genius. So on the side on the screen where the random pictures get shown is it only suppose to be 1 image per shown that is random per upload. Is there a way to tweak it so that for example 10 random new images are shown on the side of the homepage screen?
God bless u VANo
-
"Random image" Search Results (http://www.4homepages.de/forum/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwyLDMsNCw3LDgsOSwxMSwxMiwxMywxNCwxNSwxNiwxNywxOCwxOSwyMCwyMSwyMiwyMywyNSwyNiwyNywyOCwyOSwzMCwzMSwzMywzNCwzNSwzNiwzNywzOHwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c2VhcmNofCd8XCJyYW5kb20gaW1hZ2VcIg==)
"Home page" Search Results (http://www.4homepages.de/forum/index.php?action=search2;params=YWR2YW5jZWR8J3wxfCJ8YnJkfCd8MTUsMzAsMzF8InxzaG93X2NvbXBsZXRlfCd8fCJ8c3ViamVjdF9vbmx5fCd8fCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c29ydHwnfHJlbGV2YW5jZXwifHNlYXJjaHwnfFwiaG9tZSBwYWdlXCI=)
[Mod] Display random images on homepage, if no new images (http://www.4homepages.de/forum/index.php?topic=4010.0)
[MOD] Random image on home page with flash (http://www.4homepages.de/forum/index.php?topic=27350.0)
Random pictures (http://www.4homepages.de/forum/index.php?topic=4259.0)
more random images? (http://www.4homepages.de/forum/index.php?topic=15914.0)
-
Hello vano, thanks for the great links bro, I taken ur code which is without caches so new image every refresh however i want the image to go down a line, so basically with this code what happens is this.. firstly the code is below that i put into index.php and change {random_image} to {random_images}
//------------------------------------
//------- Random Images --------------
//------------------------------------
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY RAND()
LIMIT $num_new_images";
// end new
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$random_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
// $random_images .= $lang['no_new_images'];
$random_images .= "</td></tr></table>";
}
else {
$random_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$random_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$random_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$random_images .= $site_template->parse_template("thumbnail_bit");
$random_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$random_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$random_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$random_images .= "</tr>\n";
}
}
$random_images .= "</table>\n";
} // end else
$site_template->register_vars("random_images", $random_images);
unset($random_images);
//----- End Random Images---------
Before
(http://i26.tinypic.com/2n1bcyx.jpg)
After
(http://i27.tinypic.com/315xs7b.jpg)
I want it to go down in one single line, but as u can see what happens after is it goes into 2 lines. Is there a way i can tweak this sir to let it go down in 1 line?
-
In the code you posted replace all $config['image_cells'] with 1
It should do it.
P.S.
Next time please reply to the topic you have question about (the code you showed is from another topic, obviously) to avoid confusion and unnecessary questions for others who might be looking for the same solution.
-
OMg thank u for the reply, i promise i wont do it again im sorry, but now i have another issue, and i dont know where to reply here or on the other topic, i mean
Now when i go into my html home index when i log out no images are shown, its not the permissions but i think it was something from ur pervious topic which u can let a user display an XX about of pictures, i cant seem to find it, ive been trying to search for it. it was the option of u letting us display an XX amount of images on the index, and i think this maybe causing the problem. If not, i dont know what is because i replaced home.html and i replaced index.php.
when i also on top images while logged out i cannot ee the images when i log in i can, im 100% sure its not the permissions because i didnt even touch it.
-
what are the permission on your categories?
-
Only for registered users. So everything should be fine, but its not :-(
I attempted to do ur code, of making random pictures be sown on the side, then i undone it, and then reverted it back to default, then i logged off and nothing was showing, no images no random images, with the random images table on the table, its a little off on the random section. as u can see from the image below the random section isnt align to the column it a milimetre off.
also no images being shown. I really dont know why this is happening, i have put back the default, index.php and home.html and i am still having this problem
(http://i26.tinypic.com/nwwzl3.jpg)
Do u want to have a look and browse the site ???
-
when you logout you become guest, not registered user...
-
but how do i become guest, if so how do i fix it sir? Sir i promise u i havent touched anything i swear on my mothers life, i just logged out and it was blank, i mean its strange, how do i fix it
-
Guest is a visitor who is not logged in.
Registered member is a visitor who is logged in with a regular member account
Administrator is a visitor who is logged with an administrator account.
I hope this clears thing up a bit.
-
hello i just want to apologize, u r a good person and im very sorry for asking alot of questions, please dont hesitate to tell me to stop, i can be a handful at times.
Sir i have a question, can i ask u to do me a favour, i have a problem with the table section in the random section, basicailly what has happened is that the table is shifted and is not in line with the column? As u can see from the arrow below where it is pointing at, could u please advice me on what u may think is the problem,.,,
(http://i31.tinypic.com/k4gldg.jpg)
-
...
basicailly what has happened is that the table is shifted and is not in line with the column? ...
search in your templates/home.html
{if random_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
and replace:
{if random_image}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
mfg Andi
-
Hello remembrant,
i installed the mod http://www.4homepages.de/forum/index.php?topic=3529.0 (http://www.4homepages.de/forum/index.php?topic=3529.0) photo of the day, i then placed the {potd_image} next to the random pictures and the same problem of the tables shifting has occured, previously my problem was the random table but that has since been fixed with ur help but now its the photo of the day thats giving me problems... as u can see below... any tips
(http://i33.tinypic.com/2n06kgg.png)
-
again... please post your question in the corresponding mod.
that is the same:
search in potd_image.html:
<table width="150" border="0" cellspacing="0" cellpadding="0">
and repalce:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
-
Hello Vano,
I finally found this topic, i didnt want to talk about another topic in another topic because u said thaats not allowed, ok so here it goes, my problem is that when i upload new images, the random picture images on the left side of the screen are only 3, so what i want is the left side to show a maximum of lets say 6 random images but right now all im getting is 3 regardless of how many images i upload, any suggestions of what i need to tweak?
P.S GERMAN SOFTWARE TECHNOLEGY IS THE BEST
-
replace LIMIT $num_new_images";
with LIMIT 6";