[ABD]Hidden Image Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 4:35 am

For the one to edit how many posts it can be in, (bottom of your first post) you need a ; after that... you get a parse error if you don't!
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 4:45 am

I searched EVERY topic on my board (its relatively new) and I got NO picture... What does it look like, and where is it on the topic? Thanks!


I used that thing you had on the top for the number of posts it can be in... i have a thing that tells you the 5 last posts, so i set it to five... none. I posted a new topic, wasn't there...


http://www.smallballersunited.com/phpbb ... p?t=63#194
that is the only topic with a zero above the topic... what does that mean? is that supposed to be the picture?
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

pollix
Registered User
Posts: 153
Joined: Tue Jul 23, 2002 6:29 pm
Location: Ridgecrest, CA
Contact:

Post by pollix » Thu Oct 30, 2003 6:54 am

Works good but I found one problem with mine.

When the page that the random image shows up on, it shows a number in the upper left hand corner. It is the number of the post on that page that contains the random image. For example: If you have 15 posts per page, and the random image is located in post number 12, then you will have a "12" located in the upper left corner right above where it would say "{your_title} Forum Index->{whatever_topic}"



EDIT: Ok.. I found out what went wrong. When you add the following to viewtopic.php

Code: Select all

//----Hidden Image Mod------
        $sql = "SELECT * FROM phpbb_image ORDER BY id DESC";
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql);
        }

        $imgsrow = array();
        $imgsrow = $db->sql_fetchrow($result);
        $db->sql_freeresult($result);
        $random_img="";
                if($imgsrow['post_id'] == $postrow[$i]['post_id']){
                        echo $i;
                $temp_url = append_sid("randimage.$phpEx?user=".$userdata['user_id']."&post_id=".$postrow[$i]['post_id']);
                $random_img='<a href="' . $temp_url . '"><img src="' . $images['icon_random'] . '" alt="' . $total2 . '" title="' . $i . '" border="0" /></a>';
        }
//-----Hidden Image Mod------
I found out the echo $i was giving the problems. I commented out the $i and I don't have the problem anymore. I haven't found any problems with having this commented out either.

Acecool
Registered User
Posts: 1013
Joined: Sat Jul 13, 2002 4:51 am
Location: Behind my computer
Contact:

Post by Acecool » Thu Oct 30, 2003 11:38 am

Very interesting :-)
Visit Acecoolco.com :: Image

If you plan on contacting me, please read this: Legal Terms & Conditions

JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 4:05 pm

pollix wrote: Works good but I found one problem with mine.

When the page that the random image shows up on, it shows a number in the upper left hand corner. It is the number of the post on that page that contains the random image. For example: If you have 15 posts per page, and the random image is located in post number 12, then you will have a "12" located in the upper left corner right above where it would say "{your_title} Forum Index->{whatever_topic}"



EDIT: Ok.. I found out what went wrong. When you add the following to viewtopic.php

Code: Select all

//----Hidden Image Mod------
        $sql = "SELECT * FROM phpbb_image ORDER BY id DESC";
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql);
        }

        $imgsrow = array();
        $imgsrow = $db->sql_fetchrow($result);
        $db->sql_freeresult($result);
        $random_img="";
                if($imgsrow['post_id'] == $postrow[$i]['post_id']){
                        echo $i;
                $temp_url = append_sid("randimage.$phpEx?user=".$userdata['user_id']."&post_id=".$postrow[$i]['post_id']);
                $random_img='<a href="' . $temp_url . '"><img src="' . $images['icon_random'] . '" alt="' . $total2 . '" title="' . $i . '" border="0" /></a>';
        }
//-----Hidden Image Mod------
I found out the echo $i was giving the problems. I commented out the $i and I don't have the problem anymore. I haven't found any problems with having this commented out either.



I did that, I still get a zero, and no picture!
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

brazaz
Registered User
Posts: 13
Joined: Wed Oct 29, 2003 5:06 am
Contact:

Post by brazaz » Thu Oct 30, 2003 4:51 pm

2JJSmallballer
Image
try this post on your board
http://www.smallballersunited.com/phpbb ... ?p=194#194
:wink:

2pollix thanks=) i was trying to find this echo ... but i couldn't, because it was in "Hidden Image Mod Install.txt" :oops:

JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 9:47 pm

Got it! Great mod! Thanks!
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 9:59 pm

//----Hidden Image Mod------
$sql = "SELECT * FROM phpbb_image ORDER BY id DESC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql);
}

$imgsrow = array();
$imgsrow = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$random_img="";
if($imgsrow['post_id'] == $postrow[$i]['post_id']){
echo $i;
$temp_url = append_sid("randimage.$phpEx?user=".$userdata['user_id']."&post_id=".$postrow[$i]['post_id']);
$random_img='<a href="' . $temp_url . '"><img src="' . $images['icon_random'] . '" alt="' . $total2 . '" title="' . $i . '" border="0" /></a>';
}
//-----Hidden Image Mod------


Do you mean that I take out ALL $i ?
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

xmulder
Registered User
Posts: 429
Joined: Thu Jun 27, 2002 8:37 pm

Post by xmulder » Thu Oct 30, 2003 10:36 pm

Find...

Code: Select all

$sql = "SELECT * FROM phpbb_image ORDER BY id DESC"; 
if ( !($result = $db->sql_query($sql)) ) 
{ 
message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql); 
} 

$imgsrow = array(); 
$imgsrow = $db->sql_fetchrow($result); 
$db->sql_freeresult($result); 
$random_img=""; 
if($imgsrow['post_id'] == $postrow[$i]['post_id']){ 
echo $i; 
$temp_url = append_sid("randimage.$phpEx?user=".$userdata['user_id']."&post_id=".$postrow[$i]['post_id']); 
$random_img='<a href="' . $temp_url . '"><img src="' . $images['icon_random'] . '" alt="' . $total2 . '" title="' . $i . '" border="0" /></a>'; 
} 
...In that code find...

Code: Select all

echo $i;
...and replace it with...

Code: Select all

// echo $i; 
... sorted ;)

JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 11:12 pm

Well... I was looking through my database, and it says where the click me is... and it inserted it into a post that has not been posted yet... is it supposed to do this?
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

JJSmallballer
Registered User
Posts: 323
Joined: Tue May 27, 2003 12:23 am
Location: Greensboro, NC
Contact:

Post by JJSmallballer » Thu Oct 30, 2003 11:24 pm

Well... I fixed it ALL. No more numbers, the only thing that should be changed is that the user HAS to be logged on to click on the image!


Whish List:

What is above ^
-Admin Panel Page
-Be able to set how many posts it can be in (like last 10, 20, or whatever) in the admin panel, so it would save it on the database, not in the file.
Do you play guitar?
Visit http://www.tabscentral.com

Going to be the best tabs site out there!

brazaz
Registered User
Posts: 13
Joined: Wed Oct 29, 2003 5:06 am
Contact:

Post by brazaz » Fri Oct 31, 2003 12:58 am

wishlist so far:
1 - stop it from displaying in certain boards
2 - Only show the link to registered users
3 - Be able to set how many posts it can be in in the admin panel
4 - Able to set x number of buttons that would appear
5 - Allow admin to view where the link is

Kiraly
Registered User
Posts: 2
Joined: Sat Nov 01, 2003 4:19 am

Post by Kiraly » Sat Nov 01, 2003 4:46 pm

Works fine! Thanks for the great mod. There is only one thing: the alt tag (mouseover message) is the same number as it was mentioned in the previous posts. I guess I should change $i?

About the wishlist:
1. Makes sense, should be done.
2. Makes sense, should be done.
3. Makes sense, but not essential. It's not something you change very often.
4. No way! It ruins yhe whole idea! Just imagine two or three buttons on the same page! You won't feel like "Yes! I found it!"
5. No good idea. Do you want to ruin your own fun?

Jeffrey903
Registered User
Posts: 34
Joined: Thu Apr 10, 2003 8:27 pm

Post by Jeffrey903 » Sat Nov 01, 2003 8:09 pm

Kiraly wrote: 4. No way! It ruins yhe whole idea! Just imagine two or three buttons on the same page! You won't feel like "Yes! I found it!"

Maybe then have it so that if you have more than 1 image, they will always be in different topics (or....something even better could be that once you click on one of them...they all switch places)
Kiraly wrote: 5. No good idea. Do you want to ruin your own fun?

I think that it would be good to know where it is (for the admins only). Especially if you want to test that the mod works. It is possible to see where it is manually, but it's a pain. I really want to be able to see where it is, because I'm going to use this mod for a contest, and would like to know where it is at all times.

Rapid Dr3am
Registered User
Posts: 198
Joined: Sun Jul 13, 2003 4:14 pm
Location: Incommunicado
Contact:

Post by Rapid Dr3am » Sat Nov 01, 2003 8:22 pm

Also make DBAL.

Locked

Return to “[2.0.x] MODs in Development”