Report Errors Panel v1.11
PHP-Fusion: v6.01 (not test in any earlier version, may still work though)
last modified: 2006-07-13

Made By: Adnan Ahmed (info@theadnanahmed.com)
-------------------------------------------
Released under the terms and conditions of
the GNU General Public License (Version 2)
-------------------------------------------

DESCRIPTION
-----------
This panel allows the reporting of broken links, downloads, photos, or erroneous news, articles, etc.  It is very much adaptable to any new situation (email me if you need it adapted to your case).  Provides some default options for the user to choose when reporting error, and a optional comment section for additional information.  Administrators can view the errors, message back the user, and then delete it once it's been rectified.


INSTALLATION HELP
-----------------
If you need help installing/infusion this infusion, then go to the read me.  This file is to help you place the code needed in the different files to allow your users the ability to report back errors to you!

For Pictures:
Open up photogallery.php and at line 54 add this code,

     echo "<td width='10%' class='tbl2'><a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=P&er_tid=$photo_id'>Report Error</a> ";

it should go before the "if (isset($prev) || isset($next)) {"

this adds a Report Error link at the top right of the page, right before the << and >> scrolls.  Here is an example of what it looks like, http://www.theadnanahmed.com/photogallery.php?photo_id=10 you'll see it at the top right.  Another place you may want to place it instead, might be under the picture, right before the 
					>> Place Report Error Link Here <<
					Date: 06/04/2006 23:23
					Added by: Adnan
					Dimensions: 640 x 480 pixels
					Filesize: 107.98Kb
					Comments: 0
					Rating: None
					Number of views: 6
that is achieved by adding the same code as above, on line 66 right before the following,
			echo $locale['433'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";

Now save and close this file, and its done!




For Downloads:
I will provide two options here, the first one is if you are using the advanced downloads code as on my website,

Open downloads.php and then scroll down towards the bottom and find the following code,

			<a href='".FUSION_SELF."?cat_id=$cat_id&amp;download_id=".$data['download_id']."' target='_blank'>".$locale['417']."</a>

after this we will add the next piece of code, so the final result looks like http://www.theadnanahmed.com/my-cv-dc7.php (The green download button is another change, not part of this infusion)

		<br /><br /><a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=D&er_tid=".$data['download_id']."'>Report Error</a>

Now save and close this file, and its done!

The second option I'd like to present is if you are using the default downloads.php from the main Fusion site, again open downloads.php and scroll down to find,

		<a href='".FUSION_SELF."?cat_id=$cat_id&amp;download_id=".$data['download_id']."' target='_blank'>".$locale['416']."</a> (".$data['download_filesize'].")

after that add this code,

			 - <a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=D&er_tid=".$data['download_id']."'>Report Error</a>

Now save and close this file, and its done!




For Weblinks:
I will provide two options here, the first one is if you are using the advanced weblinks code as on my website,

Open weblinks.php and then scroll down towards the bottom and find the following code,

			<a href='".BASEDIR.seoname($data['weblink_name'])."-w".$data['weblink_id'].".php' target='_blank'><b>Visit the Website</b><a/>

after this we will add the next piece of code, so the final result looks like http://www.theadnanahmed.com/my-sites-wc23.php 

		 | <a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=L&er_tid=".$data['weblink_id']."'>Report Error</a>

Now save and close this file, and its done!

The second option I'd like to present is if you are using the default weblinks.php from the main Fusion site, again open weblinks.php  and scroll down to find,

		<a href='".FUSION_SELF."?cat_id=$cat_id&weblink_id=".$data['weblink_id']."' target='_blank'>".$data['weblink_name']."</a>$new

after that add this code,

			 - <a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=L&er_tid=".$data['weblink_id']."'>Report Error</a>

Now save and close this file, and its done!



For Articles:
For the articles it should not make a difference if you are using the advanced articles, or just the default one from the main Fusion site, since the addition of the "Report Error" link is not in the file itself but is in the theme.php file of the theme that you use on your site (ie. /root/theme/YourTheme/theme.php).

Since the theme.php files for the themes are not all written by one person, some discrepencies do arise, and thus you may have to look through your code a bit more than shown here to find the exact piece of code to where you want this link added.  Open theme.php and find the following piece of code (or something similar)

		if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']."  ";

right before it, add this

		echo "<a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=A&er_tid=".$info['article_id']."'>Report Error</a> | ";

the final result will look like http://www.theadnanahmed.com/validation-code-contact-me-form-r13.php (Scroll to the bottom).  Now save and close this file, and its done!




For News:
For the news the changes are made in the theme.php file of the theme of your choice (ie. /root/theme/YourTheme/theme.php).  Since the theme.php files for the themes are not all written by one person, some discrepencies do arise, and thus you may have to look through your code a bit more than shown here to find the exact piece of code to where you want this link added.  Open theme.php and find the following piece of code (or something similar)

		echo "<div align='right'>".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> \n" : "")."";

right before it, add this

		echo "<a href='".INFUSIONS."report_errors_panel/report_error.php?er_type=N&er_tid=".$info['news_id']."'>Report Error</a> | ";

Now save and close this file, and its done!



That's all for now, if you have any questions, suggestions, or anything else feel free to contact me webmaster@theadnanahmed.com or via my site http://www.theadnanahmed.com
Thanks for using this infusion, and like all my other stuff ... feedback is always welcome!

Adnan.