4images Forum & Community
General / Allgemeines => Chit Chat => Topic started by: V@no on March 15, 2005, 08:32:17 AM
-
This is list of MODs/FIXes/FAQs that we have saved from Google, Yahoo and MSN search cached pages.
If u know any other MODs/FIXes/FAQs that were posted before the hack and not included in this list and havent been published yet, please let us know
Also, if a topic already published and in the list it listed as not published, please let us know too, so we wont waste our time recreating already published topics.
NOTE:
please do not post cached pages of a mod already included in this list and listed as "mod/fix is saved but not published yet". We already have those.
Thank you.
Legend:
- mod/fix is saved but not published yet
- mod/fix is published
- mod/fix is missing need help to restore it!
The topics:
- [Mod] Add-Remove image to-from lightbox without page refresh (http://www.4homepages.de/forum/index.php?topic=5321.0)
- [MOD] Another Simple News Publishing Mod
- [Mod] Auto image resize on upload. (updated 19-09-04) (http://www.4homepages.de/forum/index.php?topic=7700.0)
- [MOD] Auto-Thumbnailer v2.2.1 (http://www.4homepages.de/forum/index.php?topic=6921.0)
- [Mod] Avatar v2.01 (http://www.4homepages.de/forum/index.php?topic=3978.0)
- [MOD] Batch Copy/Move/Edit Images v3.6 (http://www.4homepages.de/forum/index.php?topic=6759.0)
- [Mod] BitPass Micropayment System
- [MOD] Category Image v1.0.1 (http://www.4homepages.de/forum/index.php?topic=6922.0)
- [Mod] Category order - Kategorien ordnen (http://www.4homepages.de/forum/index.php?topic=6923.0)
- [MOD] CheckAndGo (All in One) (http://www.4homepages.de/forum/index.php?topic=6924.0)
- [Plugin] Check Files on server v1.1 (http://www.4homepages.de/forum/index.php?topic=6760.0)
- [Mod] check if mail-address is valid (http://www.4homepages.de/forum/index.php?topic=6551.0)
- [MOD] Contact Form (by vividviews)
- [Mod] Different cat templates - Verschiedene Kategorie Templ
- [Mod] Display random images on homepage, if no new images (http://www.4homepages.de/forum/index.php?topic=4010.0)
- [MOD] Download high resolution mod
- [Mod] Download time v.1.0
- [MOD] Dropdown options for custom database fields (http://www.4homepages.de/forum/index.php?topic=7112.0)
- [Mod] DropShadow on thumbnails (http://www.4homepages.de/forum/index.php?topic=5106.0)
- [MOD] E-Card Counter (by Crasy Sash)
- [MOD] Eigene Bilder/Menue-Link (by Cr@sy Sash)
- [Mod] Email image validation results to the user (http://www.4homepages.de/forum/index.php?topic=3627.0)
- [MOD] for Bypassing The SAFE MODE (http://www.4homepages.de/forum/index.php?topic=3958.0)
- [MOD] Featured Images (by sigma / rproctor)
- [Mod] Get images viva MMS - Bilder als MMS empfangen UPDATE
- [Mod] Image Annotation (Watermark)
- [Mod] Image-Media In New Window (easy-more practical)
- [MOD] Images Details ON / OFF (by party-cam.org)
- [MOD] Integration 4images 1.7 with vBulletin 3.0.0 RCX
- [Mod] Keep Track Of What Each User Has Downloaded (http://www.4homepages.de/forum/index.php?topic=4606.0)
- [Mod] Latest News and Archive (http://www.4homepages.de/forum/index.php?topic=6721.0)
- [Mod] Let visitors to chose how to sort images(date,name,..) (http://www.4homepages.de/forum/index.php?topic=3842.0)
- [MOD] Lightbox-Counter on any Page and ACP (by disparos)
- [MOD] Lightbox for GUESTs (http://www.4homepages.de/forum/index.php?topic=4826.0)
- [MOD] limited number of categories per page (http://www.4homepages.de/forum/index.php?topic=5581.0)
- [MOD] List group members and Enhanced administrator Email (http://www.4homepages.de/forum/index.php?topic=7387.0)
- [MOD] Logout from ACP (Admin Control Panel) (http://www.4homepages.de/forum/index.php?topic=6593.0)
- [Mod] Lost password for not activated users (http://www.4homepages.de/forum/index.php?topic=3495.0)
- [Mod] Mail Owner of image when Comment is Posted (http://www.4homepages.de/forum/index.php?topic=2705.0)
- [MOD] Making A Simple Guestbook (by rustynet)
- [Mod] Maintenance Page - Set from Admin Control panel
- [MOD] Member personal photo v1.0 (http://www.4homepages.de/forum/index.php?topic=6797.0)
- [Mod] Memberlist - Mitgliederliste for-fur v 1.7 (http://www.4homepages.de/forum/index.php?topic=1954.0)
- [MOD] Members Templates Select (http://www.4homepages.de/forum/index.php?topic=6220.0)
- [MOD] Min. width/height/size for images/thumbs on upload (http://www.4homepages.de/forum/index.php?topic=7325.0)
- [Mod] Mini-Top (http://www.4homepages.de/forum/index.php?topic=5874.0)
- [Mod] Most Ever Users Online v2 (23-01-2005) (http://www.4homepages.de/forum/index.php?topic=7290.0)
- [MOD] Multi-Language support for any text (http://www.4homepages.de/forum/index.php?topic=6749.0)
- [MOD] New images & random images in Vbulletin forumhome
- [MOD] Paging for comments (http://www.4homepages.de/forum/index.php?topic=5830.0)
- [MOD] Panoramen + Java-Applet Zusammenfassung
- [MOD] PHPNuke Module
- [Mod] Photo Of The Day (http://www.4homepages.de/forum/index.php?topic=3529.0)
- [Mod] Postkarten ZÄhler - Ecard Counter
- [MOD] Preview Comments (by rproctor)
- [MOD] Private Messages v2.5.3
- [MOD] Profile hits
- [Mod] Random Pic in phpBB
- [Mod] Random Pic in vBulletin
- [MOD] Random pictures on index_php as separate row
- [Mod] Randomizing {new_images} (http://www.4homepages.de/forum/index.php?topic=1968.0)
- [Mod] Rating Button Disabled After Vote (http://www.4homepages.de/forum/index.php?topic=5853.0)
- [Mod] Remote Image Thumbnail Creation (http://www.4homepages.de/forum/index.php?topic=6920.0)
- [Mod] Replace next-previous image text links with buttons
- [Mod] Save all settings in a file - Speichert alle Einstellu
- [MOD] Search between specifyed date (http://www.4homepages.de/forum/index.php?topic=6182.0)
- [Mod] Search Engine Friendly URLs aka Short URLs (http://www.4homepages.de/forum/index.php?topic=6729.0)
- [MOD] Search Statistics v1.2 (http://www.4homepages.de/forum/index.php?topic=6033.0)
- [MOD] Send HTML-Postcards in Mailboxes (by cheribibi)
- [Mod] Show category-folder ID in Admin Panel
- [Mod] Show user's commets from his profile (http://www.4homepages.de/forum/index.php?topic=4131.0)
- [Mod] Show user's lightbox to admin (http://www.4homepages.de/forum/index.php?topic=4107.0)
- [Mod] Slideshow (http://www.4homepages.de/forum/index.php?topic=2938.0)
- [MOD] Slideshow V2.2 Also For Lightbox (by Fugaziman)
- [MOD] Signature.php (http://www.4homepages.de/forum/index.php?topic=6755.0)
- [MOD] speed for random images !!! :D (http://www.4homepages.de/forum/index.php?topic=8239.0)
- [Mod] Suchefunktion in Kommentaren - Search in Comments
- [MOD] Terms and Conditions for images v1.1 (http://www.4homepages.de/forum/index.php?topic=7113.0)
- [MOD] Universal Paging Class v1.1 (http://www.4homepages.de/forum/index.php?topic=6926.0)
- [Mod] User upload limits (http://www.4homepages.de/forum/index.php?topic=3607.0)
- [MOD] User's latest Image in Profile (by V@no)
- [MOD] Votes saved in DB (http://www.4homepages.de/forum/index.php?topic=6123.0)
- [PLUGIN] Batch Import From ZIP Files (http://www.4homepages.de/forum/index.php?topic=4659.0)
- [Plugin][Mod] Extension for Votes saved in DB (http://www.4homepages.de/forum/index.php?topic=6404.0)
- [Plugin] ImageFolio Import-Script (http://www.4homepages.de/forum/index.php?topic=1348.0)
- [Plugin] Import images from external webspace (Beta) (http://www.4homepages.de/forum/index.php?topic=6078.0)
- [Plugin] Modified postcard viewer (http://www.4homepages.de/forum/index.php?topic=6537.0)
- [Plugin] Notepad in Control Panel (http://www.4homepages.de/forum/index.php?topic=6113.0)
- [Plugin] Postcard Viewer (http://www.4homepages.de/forum/index.php?topic=5769.0)
- [Plugin] Rebuild Thumbnails v1.0.1 (http://www.4homepages.de/forum/index.php?topic=7059.0)
- [REQ] User tracking (this is a mod to integrate pphlogger with 4images) (http://www.4homepages.de/forum/index.php?topic=7080.0)
- Automated Random Image Names (http://www.4homepages.de/forum/index.php?topic=3174.0)
- [FAQ] Can I use FTP to batch upload images? (http://www.4homepages.de/forum/index.php?topic=3080.0)
- [FAQ] Cannot add header information - headers already sent by... (http://www.4homepages.de/forum/index.php?topic=3378.0)
- [FAQ] Dont send PMs with a link to the post u have problem with. (well, actualy its more like a rule, not FAQ ;))
- English (New) Installation Instructions for 4image v1.7 (http://www.4homepages.de/forum/index.php?topic=6897)
- [FAQ] How can I include another PHP file in the templates? (http://www.4homepages.de/forum/index.php?topic=4295.0)
- [FAQ] How can I show more new images on home page? (http://www.4homepages.de/forum/index.php?topic=8946.0)
- Pic Security (very usefull topic and I've got pages: 1, 2, 3, 4, 5, 6, 8 and 10) (http://www.4homepages.de/forum/index.php?topic=6997.0)
- Popup message for not logged in users (mod that shows a popoup message if no permission to view the image)
- [FAQ] Warning Unable to create (http://www.4homepages.de/forum/index.php?topic=3383.0)
- [FAQ] Why do my pages load very slowly?
- netpbm setup - QUICK TUTORIAL (http://www.4homepages.de/forum/index.php?topic=7045.0)
- [FIX] Max height has no affect when do image resize (http://www.4homepages.de/forum/index.php?topic=7058.0)
- [FIX] [1.7] Database backup fails in Mozilla and Firefox (http://www.4homepages.de/forum/index.php?topic=7176.0)
-
We're still missing the [Error] and [Tip] posts that we had in the FAQ forum. And we're also missing the bug fixes :|
I found a few last night in the Yahoo cache but after a while, the cached pages stopped loading and I had to go to bed.
-
I have few mods with readme and install.txt files included!
Slideshow 1.3
Batch importing
News system
Import webimages 0.8.4
Image annotation 1.4
check images v2
Do I upload it to server and u will then place it where it belongs?
-
If anyone can recover the following topics, it would be greatly appreciated by all forum visitors ! These were invaluable bug fixes
1.7, 1.7.1: Reuse eCard values when modifying from preview
1.7.1: {if blah} {endif blah} left in templates
1.7, 1.7.1: No right-click javascript for all browsers
Can not upload images when no cat_id specified
Deleting an image does not remove it from lightboxes
Max height setting has no affect when you do image resize
User edit image does not pre-load original value
Quotes in category names
Wrong search results when certain conditions applied
Additional fields are not autofilled in 'edit image'
Allow IP in download URL and remote image path
Image download counter does not update when dl from lightbox
Deleting of non-activated users
ACP - can not find images uploaded by nonexistent users
Subcategory columns do not display proportionately
1.7: Back btn fails in Admin CP Edit Users/Images
Error msg when update/delete user with quote in the name
details.php with mode=lightbox, next/previous may be wrong
Can not display \\# (i.e \\2 or \\4 or \\9)
EDIT:
I have successfully recovered the following bug fix topics:
1.7, 1.7.1 Reuse eCard values when modifying from preview
1.7.1 {if blah} {endif blah} left in templates
ACP - can not find images uploaded by nonexistent users
Allow IP in download URL and remote image path
Deleting an image does not remove it from lightboxes
Deleting of non-activated users
Image download counter does not update when dl from lightbox
Quotes in category names
1.7: Database backup fails in Mozilla and Firefox
-
This mod was here before hack and I just published readmet.txt and uploaded zip files to my server! I don't give support for it couse it isn't mine!
Download file here: http://zvoncek.rozica.com/4images_news.zip
##############################################################
## MOD Title: Another Simple News Publishing Mod
## MOD Author: janfy < janfy@cagades.com > http://www.cagades.com/
## MOD Description: Adds news to your 4images gallery
##
## MOD Version: 1.3.0
##
## MOD Topic : http://www.4homepages.de/forum/index.php?topic=6778.0
##
## Installation Level: (Medium)
## Installation Time: 20 Minutes
##
## Files To Edit: - index.php
## - admin/index.php
## - admin/settings.php
## - includes/constants.php
## - lang/english/main.php
## - lang/english/admin.php
## - lang/french/main.php
## - lang/french/admin.php
## - templates/home.html
##
## Included Files: admin/news.php
## includes/rssbuilder.php
## install_news.php
## news.php
## rss.php
## rss_reader.php (simple RSS reader by Richard James Kendall-richard@richardjameskendall.com)
## templates/default/news.html
## templates/default/news_bit.html
## templates/default/news_show.html
##
## MOD Demo : http://www.bestof-sexe.com/4images/
## http://www.bestof-sexe.com/4images/news.php
## http://www.bestof-sexe.com/4images/rss.php
## http://www.bestof-sexe.com/4images/rss_reader.php
##############################################################
##############################################################
## Author Notes:
##
## Only administrator are allowed to publish news
##
##############################################################
## MOD History:
##
## 2004-09-12 - version 1.3.0: -Adding config parameters :
## - number of news to display on homepage
## OR
## - show news of the last X days
## - Allow HTML in news
## - Allow BB-Code in news
## - Allow images (BB-Code) in news
##
## -Display 'New' text for newer news
##
## 2004-08-22 - version 1.2.0: Added RSS generator
## 2004-08-15 - version 1.1.0: Added an 'Archives' page to show old news with pagination
## 2004-08-11 - Added file install_news.php to simply update your DB.
## 2004-08-08 - Version 1.0.0
## - First Release
##
##############################################################
## MOD Todo:
## - Add configuration option to easily configure rss feed
##############################################################
## Before Adding This MOD To Your Gallery, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]---------------------------------
#
includes/constants.php
#
#-----[ FIND ]---------------------------------
#
define('LIGHTBOXES_TABLE', $table_prefix.'lightboxes');
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('NEWS_TABLE', $table_prefix.'news');
#
#-----[ OPEN ]---------------------------------
#
index.php
#
#-----[ FIND ]---------------------------------
#
unset($categories);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-----------------------------------------------------
// ----- Show news ------------------------------------
//-----------------------------------------------------
if (!isset($config['news_home_display']) || $config['news_home_display'] == 1)
$sql = "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." ORDER BY news_date DESC LIMIT 0, ".((isset($config['news_nb']))?$config['news_nb']:5);
else if ($config['news_home_display'] == 2)
$sql = "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." WHERE news_date > ".(time() - ((isset($config['news_nb_days']))?$config['news_nb_days']:15)*86400)." ORDER BY news_date DESC";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$news = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$news .= $lang['no_news'];
$news .= "</td></tr></table>";
}
else {
$news = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
while ($image_row = $site_db->fetch_array($result))
{
$news .= "<tr class=\"imagerow1\">\n";
$news .= "<td width=\"100%\" valign=\"top\">\n";
$new_is_new = ($image_row['news_date'] > time() - ((isset($config['news_cutoff']))?$config['news_cutoff']:3)*86400);
$news .= "<b>".$image_row['news_title']."</b>".(($new_is_new)?" <sup class=\"new\">".$lang['new']."</sup>":"").sprintf($lang['news_posted_by'], $image_row['user_name'], format_date($config['date_format']." ".$config['time_format'], $image_row['news_date']));
$news .= "\n</td>\n";
$news .= "</tr>\n";
$news .= "<tr class=\"imagerow2\">\n";
$news .= "<td width=\"100%\" valign=\"top\">\n<br/>";
$news .= format_text($image_row['news_text'], ((isset($config['news_html']))?$config['news_html']:0), 0, ((isset($config['news_bbcode']))?$config['news_bbcode']:1), ((isset($config['news_bbcodeimg']))?$config['news_bbcodeimg']:1));
$news .= "<br/><br/>\n</td>\n";
$news .= "</tr>\n";
} // end while
$news .= "</table>\n";
} // end else
$site_template->register_vars(array(
"news" => $news,
"news_archives" => $lang['news_archive'],
"news_main" => $lang['news_main']
));
unset($news);
#
#-----[ OPEN ]---------------------------------
#
admin/index.php
#
#-----[ FIND ]---------------------------------
#
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
#
#-----[ AFTER, ADD ]------------------------------------------
#
show_nav_header($lang['news_main']);
show_nav_option($lang['news_add'], "news.php?action=addnews");
show_nav_option($lang['modify_news'], "news.php?action=modifynews");
#
#-----[ OPEN ]---------------------------------
#
lang/english/main.php
#
#-----[ FIND ]---------------------------------
#
$lang['delete'] = "[Delete]";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['news_main'] = 'News';
$lang['no_news'] = 'No news';
$lang['news_deleted'] = ' news deleted';
$lang['newss_deleted'] = ' news deleted';
$lang['news_deletion'] = 'News deletion';
$lang['newss'] = 'news';
$lang['news'] = 'news';
$lang['news_modified'] = 'News modified successfully.';
$lang['news_modified_nok'] = 'Error during news modification.';
$lang['news_deletion_confirmation'] = 'Do you really want to delete the %s selected news.';
$lang['edit_news_title'] = 'News #%d posted by %s';
$lang['news_title'] = 'Title';
$lang['news_content'] = 'Content';
$lang['news_date'] = 'Date';
$lang['modify_news'] = 'Edit news';
$lang['news_author'] = 'Author';
$lang['news_add'] = 'Add a news';
$lang['news_add_ok'] = 'News added successfully.';
$lang['news_posted_by'] = ' -- Posted by <b>%s</b> on <i>%s</i>';
$lang['news_archive'] = 'Archives';
$lang['page'] = 'Page';
#
#-----[ OPEN ]---------------------------------
#
lang/french/main.php
#
#-----[ FIND ]---------------------------------
#
$lang['delete'] = "[Supprimer]";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['news_main'] = 'Nouvelles';
$lang['no_news'] = 'Pas de nouvelle';
$lang['news_deleted'] = ' nouvelle supprimée';
$lang['newss_deleted'] = ' nouvelles supprimées';
$lang['news_deletion'] = 'Suppression de news';
$lang['newss'] = 'nouvelles';
$lang['news'] = 'nouvelle';
$lang['news_modified'] = 'Nouvelle modifiée avec succčs';
$lang['news_modified_nok'] = 'Erreur lors de la modification de la nouvelle.';
$lang['news_deletion_confirmation'] = 'Etes vous sur de vouloir supprimer la(les) %s nouvelle(s) sélectionnée(s)';
$lang['edit_news_title'] = 'Nouvelle #%d postée par %s';
$lang['news_title'] = 'Titre';
$lang['news_content'] = 'Contenu';
$lang['news_date'] = 'Date';
$lang['modify_news'] = 'Editer les nouvelles';
$lang['news_author'] = 'Auteur';
$lang['news_add'] = 'Ajouter une nouvelle';
$lang['news_add_ok'] = 'Nouvelle ajoutée avec succés.';
$lang['news_posted_by'] = ' -- Posté par <b>%s</b> le <i>%s</i>';
$lang['news_archive'] = 'Archives';
$lang['page'] = 'Page';
#
#-----[ OPEN ]---------------------------------
#
template/default/home.html
#
#-----[ FIND ]---------------------------------
#
{whos_online}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="head1">{news_main}</td>
<td class="head1" align="right"><a class="head1" href="news.php">{news_archives}</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1" colspan="2">{news}</td>
</tr>
</table>
<br />
#
#-----[ OPEN ]---------------------------------
#
lang/english/admin.php
#
#-----[ FIND ]---------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*-- Setting-Group 8 --*/
$setting_group[8] = "News";
$news_display_optionlist = array(
"1" => "Show the last 'X' news",
"2" => "Show news of the last 'X' days",
);
$setting['news_home_display'] = "News display mode";
$setting['news_nb'] = "News number";
$setting['news_nb_days'] = "Days number";
$setting['news_cutoff'] = "Number of days each news is marked as new";
$setting['news_html'] = "Allow HTML in news";
$setting['news_bbcode'] = "Allow BB-Code in news";
$setting['news_bbcodeimg'] = "Allow images (BB-Code) in news";
#
#-----[ OPEN ]---------------------------------
#
lang/french/admin.php
#
#-----[ FIND ]---------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*-- Setting-Group 8 --*/
$setting_group[8] = "Nouvelles";
$news_display_optionlist = array(
"1" => "Afficher les 'X' derničres nouvelles",
"2" => "Afficher les nouvelles des 'X' derniers jours",
);
$setting['news_home_display'] = "Mode d'affichage des nouvelles";
$setting['news_nb'] = "Nombre de nouvelles";
$setting['news_nb_days'] = "Nombre de jours";
$setting['news_cutoff'] = "Nombre de jours ou la nouvelle est considérée comme 'nouvelle'";
$setting['news_html'] = "Autoriser le HTML dans les nouvelles";
$setting['news_bbcode'] = "Autoriser le BB-Code dans les nouvelles";
$setting['news_bbcodeimg'] = "Autoriser les images (BB-Code) dans les nouvelles";
#
#-----[ OPEN ]---------------------------------
#
admin/settings.php
#
#-----[ FIND ]---------------------------------
#
show_setting_row("highlight_admin", "radio");
#
#-----[ AFTER, ADD ]------------------------------------------
#
show_table_separator($setting_group[8], 2, "#setting_group_8");
show_setting_row("news_home_display", "show_news_display_options");
show_setting_row("news_nb");
show_setting_row("news_nb_days");
show_setting_row("news_cutoff");
show_setting_row("news_html", "radio");
show_setting_row("news_bbcode", "radio");
show_setting_row("news_bbcodeimg", "radio");
#
#-----[ FIND ]---------------------------------
#
// end of functions
#
#-----[ BEFORE, ADD ]------------------------------------------
#
function show_news_display_options($setting_name, $setting_value) {
global $news_display_optionlist;
foreach ($news_display_optionlist as $key => $val) {
echo "<input type=\"radio\" name=\"setting_item[".$setting_name."]\" value=\"$key\"";
if ($setting_value == $key) {
echo " checked=\"checked\"";
}
echo "> ".$val."<br />";
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#
#-----[ DATABASE UPDATE ]------------------------------------------
#
Open a web browser and open the page http://your_domain/4images_dir/install_news.php
to update the database
-
Do I upload it to server and u will then place it where it belongs?
Yes, just post a reply to this topic and include the recovered cached pages or mod files as attachments to the post. Thank you.
-
I've uploaded the zip files to my server for this mod becouse hack destroyed it! :( I don't give support for it couse it isn't mine! Copyright notice is below! Link to zip file: http://zvoncek.rozica.com/annotation_1_4.zip
Auto annotate images MOD for 4images - Image Gallery Management System.
Version: 1.4
Author: Silly Little Lamer <sll@dalnet.ru>
Description:
This MOD automatically places a line of custom text, called "Annotation" on every image uploaded to the Gallery. Fully customizable: font type, size and color, shadow usage, offsets, annotation location, etc. "Batch Annotate" admin plug-in included, to annotate images, uploaded to your gallery before you installed this MOD.
Requirements:
To use in text annotation mode: GD2+ Library compiled with Freetype support. Also works with ImageMagic, but GD still needed for some functions, which ImageMagic is missing.
New in v.1.4
NetPBM support in both text and image embedding mode.
Media type check (applies only on jpeg images; no ‘gif’ errors anymore.
New in v.1.31
CP annotation settings are now separated from the Gallery Settings. Simplified MOD installation.
New in v.1.3
You can choose the annotation method now: text annotation or embedded PNG image (logo, text, etc.). Image embedding (hopefully) works with ImageMagick even if GD library is not installed on your server. Read notes below.
New in v.1.2
Misc. corrections (read 4images forum), code cleanup. Problem with *nix"rename" solved.
Now checking if annotation text would fit image width, skipping if not.
Now you can use variables in the "annotation text" setting, which will be automatically replaced during annotation:
%N for Site Name , %H for full Site URL (http://www.mysite.com), %U for short Site URL (www.mysite.com)
%S for User Name (image uploader name), %D for current date, %T for current time, %B to insert line break into annotation text.
New in v.1.1
Now you can customize both text and shadow colors and set alpha blending (text transparency) value for your annotation (thanks to V@no). Transparency using GD2 only!
Installation Level: Easy
Installation Time: 10 Minutes
Files To Edit: 3
/4images/member.php
/4images/admin/index.php
/4images/lang/english/admin.php
Notes:
Due to the GD2 transparency bug you have to use different embedded images for GD or ImageMagick. Prepare true transparent background PNG image to use with ImageMagick. For GD library you’d need the solid color background (for example, black), this color you will set to be transparent in the MOD settings later. See PNG examples attached.
NetPBM users: please note, that for you “alpha blending” actually means embedded image opacity.
For those, who want to disable GD font anti-aliasing (for example, with very small fonts) just set negative $ann_fill_color and $ann_shadow_color like this: -$ann_shadow_color. ImageMagic users should just take away -antialias from the respective lines.
If you get the "Could not find/open font", and you are sure, that you've set the right path and name, try removing the .ttf extension from the filename in MOD settings, e.g., use "/fonts/verdana", not "/fonts/verdana.ttf".
GD library and ImageMagic render fonts the different way, so text size will not be the same.
You wont' get very accurate result if you use smaller font size (<10 pt). There is nothing wrong in PHP or GD or even in FreeType. It is just how TrueType font works.
Do not forget, that filenames on *nix systems are case-sensitive!
GD users can check http://www.coupin.net/gd-freetype/ and http://www.coupin.net/gd-freetype/windows.php This patched GD2 version provides much better image quality.
Attention! This MOD is altering 4images database!
Please go Control Panel and backup you database now!
COPY FILES
install_annotation.php >> to the ROOT 4images directory
ia.sql >> to the ROOT 4images directory
*.png >> to the ROOT 4images directory
annotate.php >> to the /includes directory
ann_settings.php >> to the /admin directory
color.html >> to the /admin directory
batch_annotate.php >> to the /admin/plugins directory (create, if not exists)
You'd also need any Windows (not MAC!) TTF font, I'd suggest Arial of Tahoma. For NetPBM you’d need X-Window BDF font. Place it somewhere at your server and remember the full(!) path to it, you'd need to specify this path in 4images settings later. In Windows environment try to avoid very long path, especially with spaces in the name. If for some reason you still have to use such names, specify it 8.3-style (c:/progra~1/fonts/)
RUN /4images/install_annotation.php
All neccessary fields will be added to 4images database.
Afterwards delete install_annotation.php and ia.sql for security reasons!
OPEN /4images/member.php
FIND
if (!$uploaderror) {
DIRECT BEFORE, ADD
//-------------------------------------------------------------------------------------------
// --- Annotate Images ----------------------------------------------------------------------
//-------------------------------------------------------------------------------------------
if ($config['annotation_use'] && strtolower(get_file_extension($new_name) == jpg)) {
require(ROOT_PATH.'includes/annotate.php');
$ann_user_name = ($user_info['user_name']);
if ($direct_upload) { $ann_src = MEDIA_PATH."/".$cat_id."/".$new_name; }
else { $ann_src = MEDIA_TEMP_PATH."/".$new_name; }
annotate_image($ann_src);
}
//-------------------------------------------------------------------------------------------
OPEN /4images/admin/index.php
FIND
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
AFTER ADD
show_nav_option($lang['nav_ann_settings'], "ann_settings.php?action=modifysettings");
OPEN /4images/lang/english/admin.php
ADD
//-----------------------------------------------------
//--- Annotation Settings -----------------------------
//-----------------------------------------------------
$lang['nav_ann_settings'] = "Annotation Settings";
$lang['nav_ann_current_conv_tool'] = "is set as an image conversion tool";
$setting['annotation_use'] = "Use auto images annotation on image upload";
$setting['annotation_mode'] = "Annotation mode<br /><span class=\"smalltext\">Select if you using text for annotation or embedding image</span>";
$annotation_mode_optionlist = array(
"text" => "text",
"image" => "image"
);
$setting['annotation_embed_image'] = "Image to embed<br /><span class=\"smalltext\">Specify full path and filename of PNG image</span>";
$setting['annotation_embed_image_opacity'] = "Embedded image opacity<br /><span class=\"smalltext\">Specify value from 0 to 100.</span>";
$setting['annotation_embed_image_bg'] = "Embedded image background color to set as a transparent<br /><span class=\"smalltext\">Define HEX value, for example #000000. Have a look at <a target=\"_blank\" href=\"color.html\">color samples</a></span>";
$setting['annotation_font'] = "Annotation font <span class=\"smalltext\"><br>Specify full path and font filename.<br>For ImageMagick & GD Lib: <b>Windows TTF</b> fonts only, for NetPBM: <b>X-Windows BDF</b> fonts only!</span>";
$setting['annotation_font_size'] = "Annotation font size";
$setting['annotation_use_shadow'] = "Use letter shadows";
$setting['annotation_shadow_offset'] = "Shadow offset (same right and down)";
$setting['annotation_image_quality'] = "Resulting image quality (in per cent)";
$setting['annotation_text'] = "Annotation text<br /><span class=\"smalltext\">You can use the following variables: <b>%N</b> - Site Name, <b>%H</b> - full Site URL, <b>%U</b> - short Site URL, <b>%S</b> - User Name, <b>%D</b> - date, <b>%T</b> - time, <b>%B</b> - line break</span>";
$setting['annotation_fill_color'] = "Annotation text fill color<br /><span class=\"smalltext\">Define HEX value, for example #FFFFFF. Have a look at <a target=\"_blank\" href=\"color.html\">color samples</a></span>";
$setting['annotation_shadow_color'] = "Annotation text shadow color<br /><span class=\"smalltext\">Define HEX value, for example #000000. Have a look at <a target=\"_blank\" href=\"color.html\">color samples</a></span>";
$setting['annotation_fill_alpha'] = "Fill color alpha blending (transparency)<br /><span class=\"smalltext\">Alpha blending value must be between 0.0 and 0.9 0.0 = no transparency</span>";
$annotation_fill_alpha_optionlist = array(
"0.0" => "0.0",
"0.1" => "0.1",
"0.2" => "0.2",
"0.3" => "0.3",
"0.4" => "0.4",
"0.5" => "0.5",
"0.6" => "0.6",
"0.7" => "0.7",
"0.8" => "0.8",
"0.9" => "0.9",
);
$setting['annotation_shadow_alpha'] = "Shadow color alpha blending (transparency)<br /><span class=\"smalltext\">Alpha blending value must be between 0.0 and 0.9 0.0 = no transparency</span>";
$annotation_shadow_alpha_optionlist = array(
"0.0" => "0.0",
"0.1" => "0.1",
"0.2" => "0.2",
"0.3" => "0.3",
"0.4" => "0.4",
"0.5" => "0.5",
"0.6" => "0.6",
"0.7" => "0.7",
"0.8" => "0.8",
"0.9" => "0.9",
);
$setting['annotation_v_alignment'] = "Vertical annotation alignment";
$setting['annotation_h_alignment'] = "Horizontal annotation alignment";
$annotation_v_positioning_optionlist = array(
"top" => "image top",
"middle" => "image middle",
"bottom" => "image bottom"
);
$annotation_h_positioning_optionlist = array(
"left" => "left image edge",
"center" => "image center",
"right" => "right image edge"
);
$setting['annotation_top_offset'] = "Top annotation margin";
$setting['annotation_bottom_offset'] = "Bottom annotation margin";
$setting['annotation_left_offset'] = "Left annotation margin";
$setting['annotation_right_offset'] = "Right annotation margin";
OPEN /4images/lang/deutsch/admin.php
ADD
//-----------------------------------------------------
//--- Annotation Settings -----------------------------
//-----------------------------------------------------
$lang['nav_ann_settings'] = "Annotation Einstellungen";
$lang['nav_ann_current_conv_tool'] = "gewaehlt als Modul zum Erstellen der Bilder";
$setting['annotation_use'] = "Automatische Annotation-Funktion beim Upload";
$setting['annotation_mode'] = "Anmerkung Modus<br /><span class=\"smalltext\">Wahlen Sie wenn Sie Text fur Anmerkung verwendend oder Bild einbettend vor</span>";
$annotation_mode_optionlist = array(
"text" => "Text",
"image" => "Bild"
);
$setting['annotation_embed_image'] = "Einzubetten Bild<br /><span class=\"smalltext\">Spezifizieren Sie PNG voller Path und Dateiname</span>";
$setting['annotation_embed_image_opacity'] = "Eingebettete Bildnis Undurchsichtigkeit<br /><span class=\"smalltext\">Spezifizieren Sie Wert von 0 bis 100.</span>";
$setting['annotation_embed_image_bg'] = "Eingebettete Bildhintergrundfarbe, zum als transparentes einzustellen<br /><span class=\"smalltext\">Definieren Sie einen HEX Wert, Z.B. #000000. Beispiele sehen Sie hier <a target=\"_blank\" href=\"color.html\">Farbbeispiele</a></span>";
$setting['annotation_font'] = "Annotation Schriftart <br><span class=\"smalltext\">Definieren Sie die volle Pfadangabe und den Dateinamen der Schrift<br>Fьr ImageMagick & GD Lib: nur <b>Windows TTF</b> fonts, fьr NetPBM: nur <b>X-Windows BDF</b> Fonts!</span>";
$setting['annotation_font_size'] = "Annotation Schriftgrosse";
$setting['annotation_use_shadow'] = "Schatten Buchstaben verwenden";
$setting['annotation_shadow_offset'] = "Schattenversatz (gleichfalls rechts und unten)";
$setting['annotation_image_quality'] = "Auszugebende Bildqualitat (in Prozent)";
$setting['annotation_text'] = "Annotation Text<br /><span class=\"smalltext\">Sie konnen Variablen hier benutzen: <b>%N</b> fur Name der Galerie, <b>%H</b> fur Site URL, <b>%U</b> - Kurze Site URL, <b>%S</b> - Username, <b>%D</b> fur jetziges Datum, <b>%T</b> fur jetzige Zeit, <b>%B</b> - line break</span>";
$setting['annotation_fill_color'] = "Annotation Text Fullfarbe<br /><span class=\"smalltext\">Definieren Sie einen HEX Wert, Z.B. #000000. Beispiele sehen Sie hier <a target=\"_blank\" href=\"color.html\">Farbbeispiele</a></span>";
$setting['annotation_shadow_color'] = "Annotation Text Schattenfarbe<br /><span class=\"smalltext\">Definieren Sie einen HEX Wert, Z.B. #000000. Beispiele sehen Sie hier <a target=\"_blank\" href=\"color.html\">Farbbeispiele</a></span>";
$setting['annotation_fill_alpha'] = "Fullfarbe des Alpha Blending (Transparenz)<br /><span class=\"smalltext\">Der Alpha Blending Wert muss zwischen 0.0 and 1.0 (0.0 = Keine Transparenz) liegen</span>";
$annotation_fill_alpha_optionlist = array(
"0.0" => "0.0",
"0.1" => "0.1",
"0.2" => "0.2",
"0.3" => "0.3",
"0.4" => "0.4",
"0.5" => "0.5",
"0.6" => "0.6",
"0.7" => "0.7",
"0.8" => "0.8",
"0.9" => "0.9",
);
$setting['annotation_shadow_alpha'] = "Schattenfarbe des Alpha Blending (Transparenz)<br /><span class=\"smalltext\">Der Alpha Blending Wert muss zwischen 0.0 and 1.0 (0.0 = Keine Transparenz) liegen</span>";
$annotation_shadow_alpha_optionlist = array(
"0.0" => "0.0",
"0.1" => "0.1",
"0.2" => "0.2",
"0.3" => "0.3",
"0.4" => "0.4",
"0.5" => "0.5",
"0.6" => "0.6",
"0.7" => "0.7",
"0.8" => "0.8",
"0.9" => "0.9",
);
$setting['annotation_v_alignment'] = "Vertikale Ausrichtung des Annotation Textes oder Bild";
$setting['annotation_h_alignment'] = "Horizontale Ausrichtung des Annotation Textes oder Bild";
$annotation_v_positioning_optionlist = array(
"top" => "Oberer Rand des Bildes",
"middle" => "Bildmitte",
"bottom" => "Unterer Rand des Bildes"
);
$annotation_h_positioning_optionlist = array(
"left" => "Linke Bildecke",
"center" => "Bildcenter",
"right" => "Rechte Bildecke"
);
$setting['annotation_top_offset'] = "Versatz des oberen Textes oder Bild";
$setting['annotation_bottom_offset'] = "Versatz des unteren Textes oder Bild";
$setting['annotation_left_offset'] = "Versatz des linken Textes oder Bild";
$setting['annotation_right_offset'] = "Versatz des rechten Textes oder Bild";
SAVE AND UPLOAD ALL FILES TO SERVER
Go Admin Control Panel and check/modify annotations settings.
-
This is easy mod just replace the old file with this one in zip
you can download zip file from here: http://zvoncek.rozica.com/checkimages_v2.zip
-
This mod was published before forum was "hacked" and I don't give support for it couse it is not my work! Copyright notice is below! Link to the zip file http://zvoncek.rozica.com/4images_slideshow.zip
SlideshowII MOD for 4images - Image Gallery Management System.
Version: 1.3
Date: 2004-07-11
Author: Daniel Janesch <admin@the-deejay.com> http://www.the-deejay.com
Description:
This MOD shows all pictures of one Gallery as an slideshow. You can choos between three direction (ascending, descending or coincidentally). The pictures could also changed manually and the time who long a picture is shown could also be changed. Also you can use crossfade effects for visitors with internet explorer.
For a live-demo you can visit http://www.the-deejay.com.
New in v1.3 - 2004-07-11
Now it is possible to turn on/off the message after all pictures are shown in the controll panel.
Also the slideshow could be opend in new a full size window.
The javascript error is now catched for Opera browsers.
v1.2 - 2004-06-13
Now you can choose if the slideshow should open in a new window or not in the control panel.
Additional you can choose if you open the details or not when the visitor clicks on an image.
And you can set the maximum size (height, width) of the pictures in the slideshow.
v1.1 - 2004-06-04
All script parts which have to be copied into existing files are now in new files and
only a reference to the file is inserted in the existing file.
Now all single quotes (') have been replaced by double quotes (").
Also the slideshow button is available as simple text link {slideshow_link} .
v1.0 - 2004-05-27
The release of the slideshow mod II.
Installation Level: Easy
Installation Time: 10 Minutes
Files To Edit: 9
/4images/templates/default/categories.html
/4images/scripts/4images.js (if not available /4images/templates/default/header.html)
/4images/templates/default/header.html
/4images/categories.php
/4images/admin/index.php
/4images/lang/english/admin.php
/4images/lang/english/main.php
/4images/lang/deutsch/admin.php
/4images/lang/deutsch/main.php
Attention! This MOD is altering 4images database!
Please go Control Panel and backup you database now!
COPY FILES
slideshow.php >> to the ROOT 4images directory
install_slideshow.php >> to the ROOT 4images directory
slideshow.sql >> to the ROOT 4images directory
categories_slideshowII.inc >> to the ROOT 4images directory
/scripts directory >> create directory if not existing
slideshow.js >> to the /scripts directory
slideshow_settings.php >> to the /admin directory
transitions_de.html >> to the /admin directory
transitions_en.html >> to the /admin directory
*.gif >> to the /admin/images directory
admin_slideshowII.inc >> to the /lang/english directory
main_slideshowII.inc >> to the /lang/english directory
admin_slideshowII.inc >> to the /lang/english directory
main_slideshowII.inc >> to the /lang/english directory
slideshow.html >> in to the /templates/default directory
(or any other template dir e.g. my_tpl)
or you copy the whole content of the 4images directory to the ROOT 4images directory on your webserver
***************************************************************************************
***************************************************************************************
RUN /4images/install_slideshow.php
All neccessary fields will be added to 4images database.
Afterwards delete install_slideshow.php and slideshow.sql for security reasons!
***************************************************************************************
***************************************************************************************
OPEN /4images/templates/default/categories.html
FIND
<td align="right" valign="bottom">{upload_button}</td>
REPLACE
<td align="right" valign="bottom">{upload_button}{slideshow_button}</td>
***************************************************************************************
***************************************************************************************
OPEN /4images/scripts/4images.js (if not available /4images/templates/default/header.html)
END ADD
//-----------------------------------------------------
//--- Slideshow changes -------------------------------
//-----------------------------------------------------
function openslideshow(url,window_width,window_height,new_window) {
if (new_window == 2 || new_window == 1) {
var width_avail = screen.availWidth-15;
var height_avail = screen.availHeight-60;
var width_full = screen.width;
var height_full = screen.height;
// Callculate the spaces from left and top to center the new window:
var left_space = ((width_avail - window_width) > 0) ? parseInt((width_avail - window_width) / 2) : 0;
var top_space = ((height_avail - window_height) > 0) ? parseInt((height_avail - window_height) / 2) : 0;
if (new_window == 2) {
window_width = width_avail;
window_height = height_avail;
left_space = 0;
top_space = 0;
url += "&maw="+(window_width-97)+"&mah="+(window_height-194)+"&msw="+width_full+"&msh="+height_full;
} // if complete picture (whole window)
slideshow_window = window.open(url,"slideshowwindow","resizable=yes,dependent=yes,hotkeys=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,width="+window_width+",height="+window_height+",left="+left_space+",top="+top_space+"");
} // if new_window
else {
window.location.href=url;
} // else new_window
} // openslideshow
***************************************************************************************
***************************************************************************************
OPEN /4images/templates/default/header.html
SEARCH
<link rel="stylesheet" href="{template_url}/style.css" />
AFTER ADD
<script language="JavaScript" type="text/javascript" src="{template_url}/../../scripts/4images.js"></script>
SEARCH AND DELETE
function opendetailwindow() {
window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
}
***************************************************************************************
***************************************************************************************
OPEN /4images/admin/index.php
FIND
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
AFTER ADD
//-----------------------------------------------------
//--- Slideshow changes -------------------------------
//-----------------------------------------------------
show_nav_option($lang["nav_slideshow_settings"], "slideshow_settings.php?action=modifysettings");
***************************************************************************************
***************************************************************************************
OPEN /4images/categories.php
FIND
$upload_button = "<a href=\"".$upload_url."\"><img src=\"".get_gallery_image("upload.gif")."\" border=\"0\" alt=\"\" /></a>";
}
AFTER ADD
//-----------------------------------------------------
//--- Slideshow changes -------------------------------
//-----------------------------------------------------
require ("categories_slideshowII.inc");
***************************************************************************************
***************************************************************************************
OPEN /4images/lang/english/admin.php
END ADD
//-----------------------------------------------------
//--- Slideshow Settings ------------------------------
//-----------------------------------------------------
require("admin_slideshowII.inc");
***************************************************************************************
***************************************************************************************
OPEN /4images/lang/deutsch/admin.php
END ADD
//-----------------------------------------------------
//--- Slideshow Settings ------------------------------
//-----------------------------------------------------
require("admin_slideshowII.inc");
***************************************************************************************
***************************************************************************************
OPEN /4images/lang/english/main.php
END ADD
//-----------------------------------------------------
//--- Slideshow Settings ------------------------------
//-----------------------------------------------------
require("main_slideshowII.inc");
***************************************************************************************
***************************************************************************************
OPEN /4images/lang/deutsch/main.php
END ADD
//-----------------------------------------------------
//--- Slideshow Settings ------------------------------
//-----------------------------------------------------
require("main_slideshowII.inc");
***************************************************************************************
***************************************************************************************
SAVE AND UPLOAD ALL FILES TO SERVER
Go Admin Control Panel and check/modify slideshow settings.
-
Thank you but in the future, please upload attachments to THIS topic so everything is in one place. Just give up the topic title and we will know which board it goes to. I am going to merge your other posts into this topic
-
Ok sorry my mistake! :oops: I'm not used to this board and this attachment stuff... Now I've found out how to attachs things :D Tnx Chris
-
Post subject: [FIX] details.php with mode=lightbox next/prev maybe wrong
V@no
Post subject: [FIX] details.php with mode=lightbox next/prev maybe wrong
--------------------------------------------------------------------------------
This is a little bug, that will show u next/previous links in lightbox mode to images even if u dont have permission to view them and
because u dont have permission to view details of those images, u'll be redirected to index.php
(to check it try this: set view_cat permissions to ALL, set view_image permissions to ADMIN, add images in your lightbox, then add one
image from another category where u have permission to view_cat and view_image. Then go to lightbox, click on that image in details.php
u'll see link to next image that will redirect u to index.php when u click on it)
FIX:
Open /details.php
Find:Code:
WHERE image_active = 1 AND image_id IN ($image_id_sql) AND cat_id IN (".get_auth_cat_sql("auth_viewcat").")
Replace with:Code:
WHERE image_active = 1 AND image_id IN ($image_id_sql) AND (cat_id IN (".get_auth_cat_sql("auth_viewimage").") AND cat_id IN
(".get_auth_cat_sql("auth_viewcat")."))
-
[Bug Fix 1.7] Back btn fails in Admin CP Edit Users/Images
vividviews
Joined: 11 May 2002
Posts: 3060
Location: USA
Posted: 23.10.2003, 18:58 Post subject: [Bug Fix 1.7] Back btn fails in Admin CP Edit Users/Images
--------------------------------------------------------------------------------
This bug fix applies to 4images version 1.7
Problem
When editing users from the admin control panel and a multipage list is returned, the "Back" button does not work. The same holds true for "Edit Images".
Edit Users Solution
Open admin/users.php and locate this block of code:
Code:
echo "<div align=\"right\">";
echo "<form action=\"".$site_sess->url("users.php")."\" name=\"form2\" method=\"post\">\n";
if ($limitnumber != 5000 && $limitfinish < $countusers['users']) {
show_hidden_input("action", "findusers");
show_hidden_input("user_level", $user_level);
show_hidden_input("user_name", $user_name, 1);
show_hidden_input("user_email", $user_email, 1);
show_hidden_input("dateafter", $dateafter);
show_hidden_input("datebefore", $datebefore);
show_hidden_input("lastactionafter", $lastactionafter);
show_hidden_input("lastactionbefore", $lastactionbefore);
show_hidden_input("orderby", $orderby, 1);
show_hidden_input("direction", $direction, 1);
show_hidden_input("limitstart", $limitstart + $limitnumber + 1);
show_hidden_input("limitnumber", $limitnumber);
echo "<input type=\"submit\" value=\" ".$lang['search_next_page']." \" class=\"button\">\n";
}
echo "<input type=\"button\" value=\" ".$lang['back']." \" onclick=\"history.go(-1)\" class=\"button\">\n";
echo "</form>";
echo "</div>";
}
REPLACE the entire block with this:
Code:
echo "<div align=\"right\">";
echo "<form action=\"".$site_sess->url("users.php")."\" name=\"form2\" method=\"post\">\n";
//if ($limitnumber != 5000 && $limitfinish < $countusers['users']) {
show_hidden_input("action", "findusers");
show_hidden_input("user_level", $user_level);
show_hidden_input("user_name", $user_name, 1);
show_hidden_input("user_email", $user_email, 1);
show_hidden_input("dateafter", $dateafter);
show_hidden_input("datebefore", $datebefore);
show_hidden_input("lastactionafter", $lastactionafter);
show_hidden_input("lastactionbefore", $lastactionbefore);
show_hidden_input("orderby", $orderby, 1);
show_hidden_input("direction", $direction, 1);
show_hidden_input("limitstart", $limitstart + $limitnumber + 1);
show_hidden_input("limitnumber", $limitnumber);
if( $limitstart > 1 )
echo "<input type=\"button\" value=\" ".$lang['back']." \" onclick=\"limitstart.value=limitstart.value-limitnumber.valu
e*2;submit();\" class=\"button\">\n";
if ($limitnumber != 5000 && $limitfinish < $countusers['users']) {
echo "<input type=\"submit\" value=\" ".$lang['search_next_page']." \" class=\"button\">\n";
}
// echo "<input type=\"button\" value=\" ".$lang['back']." \" onclick=\"history.go(-1)\" class=\"button\">\n";
echo "</form>";
echo "</div>";
}
Edit Images Solution
Open admin/images.php and locate this block of code:
Code:
echo "<div align=\"right\">";
echo "<form action=\"".$site_sess->url("images.php")."\" name=\"form2\" method=\"post\">\n";
if ($limitnumber != 5000 && $limitfinish < $countimages['images']) {
show_hidden_input("action", "findimages");
show_hidden_input("image_id", $image_id);
show_hidden_input("image_name", $image_name, 1);
show_hidden_input("image_description", $image_description, 1);
show_hidden_input("image_keywords", $image_keywords, 1);
show_hidden_input("cat_id", $cat_id);
show_hidden_input("image_media_file", $image_media_file, 1);
show_hidden_input("image_thumb_file", $image_thumb_file, 1);
show_hidden_input("dateafter", $dateafter);
show_hidden_input("datebefore", $datebefore);
show_hidden_input("downloadsupper", $downloadsupper);
show_hidden_input("downloadslower", $downloadslower);
show_hidden_input("ratingupper", $ratingupper);
show_hidden_input("ratinglower", $ratinglower);
show_hidden_input("votesupper", $votesupper);
show_hidden_input("voteslower", $voteslower);
show_hidden_input("hitsupper", $hitsupper);
show_hidden_input("hitslower", $hitslower);
show_hidden_input("orderby", $orderby, 1);
show_hidden_input("direction", $direction, 1);
show_hidden_input("limitstart", $limitstart + $limitnumber + 1);
show_hidden_input("limitnumber", $limitnumber);
echo "<input type=\"submit\" value=\" ".$lang['search_next_page']." \" class=\"button\">\n";
}
echo "<input type=\"button\" value=\" ".$lang['back']." \" onclick=\"history.go(-1)\" class=\"button\">\n";
echo "</form>";
echo "</div>";
}
REPLACE the entire block with this:
Code:
echo "<div align=\"right\">";
echo "<form action=\"".$site_sess->url("images.php")."\" name=\"form2\" method=\"post\">\n";
//if ($limitnumber != 5000 && $limitfinish < $countimages['images']) {
show_hidden_input("action", "findimages");
show_hidden_input("image_id", $image_id);
show_hidden_input("image_name", $image_name, 1);
show_hidden_input("image_description", $image_description, 1);
show_hidden_input("image_keywords", $image_keywords, 1);
show_hidden_input("cat_id", $cat_id);
show_hidden_input("image_media_file", $image_media_file, 1);
show_hidden_input("image_thumb_file", $image_thumb_file, 1);
show_hidden_input("dateafter", $dateafter);
show_hidden_input("datebefore", $datebefore);
show_hidden_input("downloadsupper", $downloadsupper);
show_hidden_input("downloadslower", $downloadslower);
show_hidden_input("ratingupper", $ratingupper);
show_hidden_input("ratinglower", $ratinglower);
show_hidden_input("votesupper", $votesupper);
show_hidden_input("voteslower", $voteslower);
show_hidden_input("hitsupper", $hitsupper);
show_hidden_input("hitslower", $hitslower);
show_hidden_input("orderby", $orderby, 1);
show_hidden_input("direction", $direction, 1);
show_hidden_input("limitstart", $limitstart + $limitnumber + 1);
show_hidden_input("limitnumber", $limitnumber);
if( $limitstart > 1 )
echo "<input type=\"button\" value=\" ".$lang['back']." \" onclick=\"limitstart.value=limitstart.value-limitnumber.value*2;submit();\" class=\"button\">\n";
if ($limitnumber != 5000 && $limitfinish < $countimages['images']) {
echo "<input type=\"submit\" value=\" ".$lang['search_next_page']." \" class=\"button\">\n";
}
//echo "<input type=\"button\" value=\" ".$lang['back']." \" onclick=\"history.go(-1)\" class=\"button\">\n";
echo "</form>";
echo "</div>";
}
-
Post subject: [FIX] Subcategories columns dont show proportionaly
V@no
Joined: 17 Jul 2002
Posts: 5351
Location: Atlanta, GA, RUSSIA-LATVIA
Posted: 26.12.2002, 09:23 Post subject:
--------------------------------------------------------------------------------
I think it's little bug....
here is the fix:
1. Open /includes/functions.php file.
1.2. Find:Code:
if ($total <= $table_columns && $table_columns > 1) {
$table_rows = 1;
}
else {
$table_rows = $total / $table_columns;
if ($total >= $table_columns && !is_integer($table_rows)) {
$table_rows = intval($table_rows) + 1;
}
}
Just delete it.
-
Auto fill in additional image fields
moritzh
Joined: 11 Mar 2003
Posts: 3
Location: Zurich (CH) / Hamburg (D)
Posted: 06.08.2003, 19:50 Post subject: Auto fill in additional image fields/Zusätzliche Bild-Felder
--------------------------------------------------------------------------------
If you add additional user and image fields to your gallery following the description in db_field_definitions.php, you will have one problem when including these fields in your templates, such as member_editimage.html:
While the standard fields (such as name of the image) will be filled with the existing (current) values on the member_editimage.html form, all the additional fields will show up empty.
This only happened to me with the additional image fields, not with the additional user fields. Strange...
For instance, I added additional fields like user_name_last and user_name_first and image_photographer. I changed member_editprofile.html and member_editimage.html and member_uploadform.html to let users change these additional fields. However, while all the user_fields worked perfectly alright (meaning that on the page where users can modify their profile (member_editprofile.html) all the existig values where already filled in (e.g. if a last name was stored in user_name_last, it showed up)), the additional image fields didn't (meaning that if something was stored for the name of the photographer in image_photographer, it still did not show up on member_editimage, so the field was blank although a name was stored).
Here is how I resolved it:
#####
OPEN
#####
member.php
#####
FIND
#####
Code:
$site_template->register_vars(array(
"image_id" => $image_id,
"image_name" => htmlspecialchars($image_name),
"image_description" => htmlspecialchars($image_description),
"image_keywords" => htmlspecialchars($image_keywords),
"image_allow_comments_yes" => ($image_allow_comments) ? " checked=\"checked\"" : "",
"image_allow_comments_no" => (!$image_allow_comments) ? " checked=\"checked\"" : "",
"lang_edit_image" => $lang['image_edit'],
"lang_image_name" => $lang['image_name'],
"lang_description" => $lang['description'],
"lang_keywords" => $lang['keywords_ext'],
"lang_allow_comments" => isset($lang['allow_comments']) ? $lang['allow_comments'] : "",
"lang_submit" => $lang['submit'],
"lang_reset" => $lang['reset'],
"lang_yes" => $lang['yes'],
"lang_no" => $lang['no']
));
if (!empty($additional_image_fields)) {
$additional_field_array = array();
foreach ($additional_image_fields as $key => $val) {
if ($val[1] == "radio") {
$value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : 1;
if ($value == 1) {
$additional_field_array[$key.'_yes'] = " checked=\"checked\"";
$additional_field_array[$key.'_no'] = "";
}
else {
$additional_field_array[$key.'_yes'] = "";
$additional_field_array[$key.'_no'] = " checked=\"checked\"";
}
}
else {
$value = (isset($HTTP_POST_VARS[$key])) ? htmlspecialchars(stripslashes(trim($HTTP_POST_VARS[$key]))) : "";
}
$additional_field_array[$key] = $value;
$additional_field_array['lang_'.$key] = $val[0];
}
if (!empty($additional_field_array)) {
$site_template->register_vars($additional_field_array);
}
}
$content = $site_template->parse_template("member_editimage");
####
REPLACE WITH
####
Code:
$site_template->register_vars(array(
"image_id" => $image_id,
"image_name" => htmlspecialchars($image_name),
"image_description" => htmlspecialchars($image_description),
"image_keywords" => htmlspecialchars($image_keywords),
"image_allow_comments_yes" => ($image_allow_comments) ? " checked=\"checked\"" : "",
"image_allow_comments_no" => (!$image_allow_comments) ? " checked=\"checked\"" : "",
"lang_edit_image" => $lang['image_edit'],
"lang_image_name" => $lang['image_name'],
"lang_description" => $lang['description'],
"lang_keywords" => $lang['keywords_ext'],
"lang_allow_comments" => isset($lang['allow_comments']) ? $lang['allow_comments'] : "",
"lang_submit" => $lang['submit'],
"lang_reset" => $lang['reset'],
"lang_yes" => $lang['yes'],
"lang_no" => $lang['no']
));
// BEGIN MOD Auto fill in for additional image fields
$sql2 = "SELECT image_id".$additional_sql."
FROM ".IMAGES_TABLE."
WHERE image_id = $image_id";
$image_row2 = $site_db->query_firstrow($sql2);
// END MOD Auto fill in for additional image fields
if (!empty($additional_image_fields)) {
$additional_field_array = array();
foreach ($additional_image_fields as $key => $val) {
if ($val[1] == "radio") {
// BEGIN MOD Auto fill in for additional image fields
$value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : intval($image_row2[$key]);
// END MOD Auto fill in for additional image fields
if ($value == 1) {
$additional_field_array[$key.'_yes'] = " checked=\"checked\"";
$additional_field_array[$key.'_no'] = "";
}
else {
$additional_field_array[$key.'_yes'] = "";
$additional_field_array[$key.'_no'] = " checked=\"checked\"";
}
}
else {
// BEGIN MOD Auto fill in for additional image fields
$value = (isset($HTTP_POST_VARS[$key])) ? htmlspecialchars(stripslashes(trim($HTTP_POST_VARS[$key]))) : htmlspecialchars(stripslashes($image_row2[$key]));
// END MOD Auto fill in for additional image fields
}
$additional_field_array[$key] = $value;
$additional_field_array['lang_'.$key] = $val[0];
}
if (!empty($additional_field_array)) {
$site_template->register_vars($additional_field_array);
}
}
$content = $site_template->parse_template("member_editimage");
Please note: I have quite a few modifications in my code, so I don't know if it was me (the modifications) that caused the bug or if this was already in the original version of the code. Also, I have very limited knowledge about PHP and MySQL, so this solution might not be very elegant. But it worked for me...
-
Post subject: [Bug Fix] Database backup fails in Mozilla and Firefox
V@no
Joined: 17 Jul 2002
Posts: 7348
Location: St. Petersburg, FL, RUSSIA-LATVIA
Posted: 25.07.2004, 06:35 Post subject: [Bug Fix] Database backup fails in Mozilla and Firefox
--------------------------------------------------------------------------------
dmair wrote:
OK, this is scary! I just tried to do a database backup before archiving my 4Images content and it failed (with all the error info in the .sql file). All the SQL statements had no table name in them. It was caused by a missing equals sign in backup.php where it generates the value attribute for the option tag in the form's select element that contains the table list:
Code:
$result = $site_db->query("SHOW tables");
while ($row = $site_db->fetch_array($result)) {
$table_select .= "<option value\"".$row[0]."\"";
if (in_array($row[0], $default_tables) && preg_match("/^".$table_prefix."/i", $row[0])) {
$table_select .= " selected";
}
$table_select .= ">".$row[0]."</option>\n";
}
should look like this:
Code:
$result = $site_db->query("SHOW tables");
while ($row = $site_db->fetch_array($result)) {
$table_select .= "<option value=\"".$row[0]."\"";
if (in_array($row[0], $default_tables) && preg_match("/^".$table_prefix."/i", $row[0])) {
$table_select .= " selected";
}
$table_select .= ">".$row[0]."</option>\n";
}
Before I figured out the cause I downloaded the published 4Images and compared the files with my own copies (I use the same version with a few mods). The equals sign is missing on the version I just downloaded.
What I find weird is that I think backup used to work! Until today I had backups of around 4000kB, today I made one and it was 8.6kB and really only a list of error messages from MySQL
-
Post subject: [FIX] Cant upload images when not cat_id specifyed
V@no
Joined: 17 Jul 2002
Posts: 5342
Location: Atlanta, GA, RUSSIA-LATVIA
Posted: 29.05.2003, 14:27 Post subject: [FIX] Cant upload images when not cat_id specifyed
--------------------------------------------------------------------------------
When u go to http://yoursite.com/4images/member.php?action=uploadform it will show u list of categories avalable for upload.
Even if u select a category, it wont let u upload and show u error message "Please select a category".
To fix that, open /templates/<yourtemplate>/member_uploadform.html
Find:Code:
<input type="hidden" name="cat_id" value="{cat_id}" />
Replace with:Code:
{if cat_id}<input type="hidden" name="cat_id" value="{cat_id}" />{endif cat_id}
-
Thats all the ones I could find that Chris asked for.
-
Big thanks for the help! I found a bunch of them already and reposted them to the bug fix forum last night. Thanks again
-
Mod: "Admin Levels / moderators" fehlt noch.
Die alte Url dieses Mods lautete: http://www.4homepages.de/forum/viewtopic.php?t=10756
Leider weiß ich auch nicht mehr wer dieses Mod geschrieben hatte.
------------------------english-------------------------------
The mod 'Admin Levels / moderators'. is missing.
The old URL of this mod was: http://www.4homepages.de/forum/viewtopic.php?t=10756
-
missing MOD - but wrote a mail to rproctor - and asked to publish again :wink:
[MOD COMPLETE] Show newest images in main cat from sub cat.
:roll: 8)
Vincent
-
This is mod for protect images. But I am don't remember name. :( (Author - Vano)
http://4homepages.de/forum/viewtopic.php?p=40247#40247
I just wanted to share with the public with another way to secure pictures, that I made long time ago and successfuly have been using on my site. It hides location of the pictures and adds antileech as well.
Step 1.
Open /includes/functions.php
Find:
Code:
function show_image($image_row, $mode = "", $show_link = 1, $detailed_view = 0) {
Replace with:
Code:
function show_image($image_row, $mode = "", $show_link = 1, $detailed_view = 0, $encrypt = 0) {
Step 1.2.
Find:
Code:
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view),
Replace with:
Code:
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, $encrypt),
Step 1.3.
Find:
Code:
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0) {
Replace with:
Code:
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0, $encrypt = 0) {
Step 1.4.
Find:
Code:
"media_src" => $media_src,
Replace with:
Code:
"media_src" => ($encrypt) ? ROOT_PATH."show.php?pic=".encrypt_add($media_src) : $media_src,
"media_src_original" => $media_src,
Step 1.5.
At the end of the file, just before closing ?> insert:
Code:
function encrypt_add($file){
global $_SESSION;
@session_name('4images_pic');
@session_start();
$file = base64_encode($file);
$id = md5(uniqid(microtime()));
$_SESSION['4images_pic'] = $id." ".$file." ".time();
return $id;
}
Step 1.6. (added 10/15/2004)
If u installed [MOD] Show original image in new window by clicking on image
then also u'll need do this:
Find:
Code:
"media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1),
Replace it with:
Code:
"media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1, 1),
Also Step 1.2 and Step 1.3. has to be changed for u:
in Step 1.2 use this line:
Code:
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0, $big=0, $encrypt = 0) {
and in Step 1.3 this:
Code:
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, $big, $encrypt),
Step 2.
Open /details.php
Find:
Code:
show_image($image_row, $mode, 0, 1);
Replace with:
Code:
show_image($image_row, $mode, 0, 1, 1);
Step 3.
Create a new file and save it as show.php in 4images root dir, with this code:
Code:
<?php
//-----------------------------------------------------\\
//--- Created by V@no ©2003 http://gallery.vano.org ---\\
//-----------------------------------------------------\\
//---- Settings --------
$expire = 35; //seconds
$reduce = 20; //reduce expire time after first call
//-- End Settings ------
define('ROOT_PATH', './');
include(ROOT_PATH.'includes/upload_definitions.php');
@session_name('4images_pic');
@session_start();
function is_remote_file($file_name) {
return (preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.([a-z]{1,4})$)#is", $file_name)) ? 1 : 0;
}
function get_file_extension($file_name) {
ereg("(.+)\.(.+)", basename($file_name), $regs);
return strtolower($regs[2]);
}
function get_file($file){
$file_size = @filesize($file);
$fp = @fopen($file, "rb");
$data = @fread ($fp, $file_size);
@fclose($fp);
return $data;
}
if (isset($_GET['pic']) || isset($_POST['pic'])) {
$id = (isset($_GET['pic'])) ? $_GET['pic'] : $_POST['pic'];
}else{
$id = 0;
}
$error = "";
if ($id && isset($_SESSION['4images_pic']) && $_SESSION['4images_pic']) {
$expired = time() - $expire;
$pic = explode(" ", $_SESSION['4images_pic']);
if (count($pic) != 3) {
$error = "no/pic_error.gif"; //general error
}elseif ($pic[0] != $id) {
$error = "no/pic_image.gif"; //no image found
}elseif ($expired >= $pic[2]) {
$error = "no/pic_expired.gif"; //image expired
}
if (!$error) {
$file = base64_decode($pic[1]);
$file_size = @filesize($file);
$_SESSION['4images_pic'] = $pic[0]." ".$pic[1]." ".($pic[2]-$reduce);
if ($image_info = @getimagesize($file) && !is_remote_file($file) && $mime_type_match[get_file_extension($file)][0]) {
header ("Content-type: ".$mime_type_match[get_file_extension($file)][0]);
$file = get_file($file);
header ("Content-Length: ".strlen($file)."\n\n");
echo $file;
exit;
}
header ("Location: ".stripslashes($file));
exit;
}else{
unset($_SESSION['4images_pic']);
}
}else{
$error = "no/pic_error.gif";
}
header("Content-type: image/gif");
echo get_file($error);
?>
Adjust two values:
Quote:
//---- Settings --------
$expire = 35; //seconds before expiration. If u make it too low, the visitors whos on dialup will get "picture expired".
$reduce = 20; //reduce expire time in seconds after each call (not a good idea set this same as $expire time, because some browsers can do "double" page refresh, that will cause of "expire" message.)
//-- End Settings ------
Step 4.
Create 3 .gif images that would be showed instead of the real image, when something went wrong. Upload them in /no/ folder (create it first. Name of the images must be as followed):
/no/pic_error.gif - general error (something wrong with the session or ID didnt match)
/no/pic_image.gif - image not found
/no/pic_expired.gif - image expired
Step 5. (added 09/13/04)
Open postcards.php
Find:
Code:
$image = get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, 1);
Replace with:
Code:
$image = get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, 1, 0, 1);
after all this u can rename your /media/ folder to something else and noone could find where the images are (dont forget adjust /includes/constants.php too)
P.S. this method has few down-sides:
- each time picture being viewed it will be downloaded from the server, instead of showing from cache (extra trafic)
- the script returns the original media path when the media is not an image (.avi, .zip, etc) or when media is remote.
And here is how to make sure the browser doesn't cache the viewed file to disk.
Change this IN show.php block:
Code:
header ("Content-Length: ".strlen($file)."\n\n");
echo $file;
exit;
to this:
Code:
header ("Content-Length: ".strlen($file)."\n\n");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // expires in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Last modified, right now
header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1
header("Pragma: no-cache"); // Prevent caching, HTTP/1.0
echo $file;
exit;
martrix wrote:
It would be very nice, if somebody could write how to add this nonono.gif modification to 4images and how to mask the {media_src} url.
it's pretty much simple
open /templates/<yourtemplate>/media/jpg.html (this example for jpg.html template, but u'll need do same thing for all others templates for images)
Replace
Code:
<img src="{media_src}" border="1" alt="{image_name}"{width_height} />
with:
Code:
<table style="background: url({media_src}) no-repeat; background-position: center center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="{template_url}/images/spacer.gif" border="1" alt="{image_name}"{width_height} /></td>
</tr>
</table>
asume that u have spacer.gif file in /templates/<yourtemplate>/images/ folder.
P.S. Please, help find this mod: [Mod] Get images viva MMS - Bilder als MMS empfangen UPDATE!
-
Hi I am not fully sure that these are the ones you have mentioned ... or the proper version. but i have recieved great support from this forum several times . so if these files helps , i would be very happy . http://www.discusstv.com/discusstv.com/sigs/annotation_1_4.zip and http://www.discusstv.com/discusstv.com/sigs/batch_import.zip
I also have this one for showing random images at external server . i am pasting here
Showing random image at external web-page (could be even on different server)
Code:
<?php
define('ROOT_PATH', './4images/');
define('SITE_URL', 'http://gallery.mysite.com/');
$db_servertype = "mysql";
$db_host = "localhost";
$db_name = "database";
$db_user = "user";
$db_password = "password";
$table_prefix = "4images_";
define('4IMAGES_ACTIVE', 1);
include_once('db_mysql.php');
define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');
define('THUMB_DIR', 'data/thumbnails');
define('AUTH_ALL', 0);
define('AUTH_USER', 2);
define('AUTH_ACL', 3);
define('AUTH_ADMIN', 9);
$pics_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
$sql = "SELECT COUNT(*) as total_images FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL."";
$row = $pics_db->query_firstrow($sql);
$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 ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL." LIMIT $number, 1";
$row = $pics_db->query_firstrow($sql);
$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'] : SITE_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a target=\"a\" href=\"".SITE_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"></a><br>\n";
echo "$image_name<br>\n";
echo "<a target=\"a\" href=\"".SITE_URL."\">Total: <b>$total_images</b> images in the gallery</a><br>\n";
?>
Showing latest image at external web-page (could be even on different server)
Code:
<?php
define('ROOT_PATH', './4images/');
define('SITE_URL', 'http://gallery.mysite.com/');
$db_servertype = "mysql";
$db_host = "localhost";
$db_name = "database";
$db_user = "user";
$db_password = "password";
$table_prefix = "4images_";
define('4IMAGES_ACTIVE', 1);
include_once('db_mysql.php');
define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');
define('THUMB_DIR', 'data/thumbnails');
define('AUTH_ALL', 0);
define('AUTH_USER', 2);
define('AUTH_ACL', 3);
define('AUTH_ADMIN', 9);
$pics_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
$sql = "SELECT COUNT(*) as total_images FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL."";
$row = $pics_db->query_firstrow($sql);
$total_images = $row['total_images'];
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date FROM ".PIC_IMAGES_TABLE." a, ".PIC_CATEGORIES_TABLE." b WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL." ORDER BY a.image_date DESC LIMIT 1";
$row = $pics_db->query_firstrow($sql);
$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'] : SITE_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a target=\"a\" href=\"".SITE_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"></a><br>\n";
echo "$image_name<br>\n";
echo "<a target=\"a\" href=\"".SITE_URL."\">Total: <b>$total_images</b> images in the gallery</a><br>\n";
?>
Usage: copy db_mysql.php from 4images directory to your external website, put <?php include("./filename.php"); ?> into the page, where you want to show pics
-
Ich habe das hier im Google Cache gefunden!
von Cr@zy Sash: Bilder als MMS auf`s Handy laden!
So hier nun ein neuer Mod von mir. Ich denke mal im Zeitalter, wo die MMS Handy im Kommen sind, da ist so ein Servcie genau das richtige für eine Seite um mehr Besucher zu bekommen.
Übersicht:
Mit diesem Mod könnt ihr euch die Thumbnails aus eurer Gallery auf euer MMS - fähiges Handy holen
Geänderte Dateien:
- includes/functions.php
- includes/constants.php
- templates/<dein Template>/details.html
- lang/<deine Sprache>/main.php
Neue Dateien:
- mms.php
- getmms.php
- templates/<dein Template>/mms.html
- templates/<dein Template>/images/mms.gif
Installation
WICHTIG: Mache vorher von den geänderten Dateien Dateien ein Backup
1.)
Öffne die Datei includes/functions.php finde:
Code:
else {
$user_name = $lang['userlevel_guest'];
$user_name_link = $user_name;
}
füge dahinter das ein:
Code:
$mms = '<a href="javascript:mms(\''.$site_sess->url(ROOT_PATH."mms.php?id=".$image_row['image_id']."").'\')"><img border="0" src="'.get_gallery_image("mms.gif").'"></a>';
suche nach:
Code:
"image_file_name" => $image_row['image_media_file'],
füge dahinter ein:
Code:
"mms" => $mms,
2.)
Öffne die Datei includes/constants.php
suche nach:
Code:
// If 4images has problems to find out the right URL, define it here.
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
ersetzen mit:
Code:
// If 4images has problems to find out the right URL, define it here.
define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
Wobei du da dann deine richtige Url zur Gallery angeben musst!!!
3.)
Öffne die templates/<dein Template>/details.html
suche nach:
Code:
{header}
füge dahinter ein
Code:
<script language="javascript">
function mms(url) {
var winWidth = 500;
var winHeight = 350;
var w = (screen.width - winWidth)/2;
var h = (screen.height - winHeight)/2 - 60;
var name = 'MMS';
var features = 'scrollbars=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
window.open(url,name,features);
}
</script>
So nun kannst du irgenwo im Template noch den Tag {mms} setzen, damit die User das Bild schicken können.
4.)
Öffne die lang/<deine Sprache>/main.php
und füge folgendes ein:
Code:
//-----------------------------------------------------
//--- Send MMS ----------------------------------------
//-----------------------------------------------------
$lang['mmsheadline'] = "Bild als MMS schicken";
$lang['imagewidth'] = "Bildbreite:";
$lang['imageheight'] = "Bildhöhe:";
$lang['download'] = "Downlaod";
$lang['id'] = "ID:";
$lang['mmstext'] = "<b>So kommt dieses Bild auf Ihr Handy</b><br>
<ul>
<li> Rufen Sie im WAP-Menu \"Zur Adresse\" auf<li> Geben Sie dort folgendes ein:
<br> <b>{url_mms_id}</b><li> Es erscheint folgendes:<br>
ID: <b>{mms_id}</b><br><b>Ok, Download</b>
<li> Wählen Sie \"Download\"<li>
Das Bild wird nun auf Ihr Handy geladen. Bitte gedulden Sie sich einen Augenblick.<li>
Beim abgeschlossenen Download erscheint:<br> <b>Datei empfangen</b><br>Optionen - zurück<li> Wählen Sie <BR> <b>Optionen > Speichern</b><li> Geben Sie dem Bild nun noch einen Namen und wählen Sie einen Ordner aus.<li> <b>Jetzt ist das Bild in auf Ihrem Handy abgespeichert!</b>
</ul>";
5.)
Erstelle eine neue Datei mms.php und füge folgenen Code ein:
Code:
<?php
define('ROOT_PATH', './');
$main_template = 'mms';
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');
$sql = "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE."
WHERE image_id = ".$id."";
$image_row = $site_db->query_firstrow($sql);
$file_size = "n/a";
if ($file_size = @filesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_media_file'])) {
$file_size = format_file_size($file_size);
}
$size = @getimagesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."");
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $mode, $show_link),
"file_size" => $lang['file_size']." ".$file_size,
"width" => $lang['imagewidth']." ".$size[0]." ".$lang['px'],
"height" => $lang['imageheight']." ".$size[1]." ".$lang['px'],
"mmsheadline" => $lang['mmsheadline'],
"text" => $lang['mmstext'],
"mms_id" => $id,
"url_mms_id" => "".SCRIPT_URL."/getmms.php?id=".$id.""
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>
6.)
Erstelle eine neue Datei getmms.php und füge folgenen Code ein:
Code:
<?php
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
if (!$id) {
echo $lang['error'];
exit;
}
$sql = "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE."
WHERE image_id = ".$id."";
$image_row = $site_db->query_firstrow($sql);
echo $lang['id']." ".$id;
echo "
<br>
<a href=\"".SCRIPT_URL."/data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."\">".$lang['download']."</a>";
?>
7.)
Erstelle eine neue Datei templates/<dein Template>/mms.html
In dem Template kannst du folgen Tags nutzen:
- {mmsheadline} Zur Anzeige der Überschrift
- {text} Zur Anzeige des Hilfetextes
- {thumbnail} Zur Anzeige der Bilddatei
- {width} Zur Anzeige der Breite
- {height} Zur Anzeige der Höhe
- {file_size} Zur Anzeige der Dateigröße
Ein Beispiel des gesamten Templates:Code:
<html>
<head>
<title>{site_name}</title>
<link rel="stylesheet" href="{template_url}/style.css">
</head>
<body bgcolor="#001B8B" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" text="#FFFFFF">
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<td class="head1" height="19">{mmsheadline}</td>
</tr>
<tr>
<td class="head1">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="row2">{text}</td>
</tr>
</table>
</td>
<td class="head1">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="row2" align="center">{thumbnail}<p>{file_size}<p>{widh}<p>{height}</td>
</tr>
</table>
</body>
</html>
Erstelle einen neuen Button templates/<dein Template>/images/mms.gif
Feritg!
So nun nochein paar wichtige Information zur Nutzung:
Die Thumbnails dürfen nicht größer als 128x128 sein und sollten wenn möglich eine Dateigröße von 18 kb nicht überschreiten. Alles weitere rund um die Nutzung dürfte aus dem Infotext klarwerden, der erscheint, wenn man den MMS Button in der Detailansicht klickt.
Eine Demo gibt es wie immer unter: http://crazyfunpics.de
==========================================
-
to mematola
Maybe you have this mod in English?
-
@ Vano, I have published PMv2.5.3 in this thread (http://www.4homepages.de/forum/index.php?topic=6692.0). If you are happy with the formatting I gave it, I can post it to the correct forum?
-
Hello :)
Well I only ever used one mod, which was the one "IPB V2 Intergration". Never worked for me, but others may be able to give it a whirl (or contact me if you can help me with it!).
File attatched.
---
Hallo! :)
Ich habe die "IPB V2 Intergration" steckbar. Die Akte ist attatched. Anmerkung: Diese Akte ist auf englisch nur.
- Sully
-
to mematola
Maybe you have this mod in English?
please!
==========================================
Well a new tecnologie is born. MMS! I think you can get more users on your gallery if you have a mms service on it.
Overview:
You can recieve all images on your mms mobilphone.
Changed files:
- includes/functions.php
- includes/constants.php
- templates/<dein Template>/details.html
- lang/<deine Sprache>/main.php
New files:
- mms.php
- getmms.php
- templates/<dein Template>/mms.html
- templates/<dein Template>/images/mms.gif
Installation
Important: Backup all files
1.)
Open includes/functions.php find:
Code:
else {
$user_name = $lang['userlevel_guest'];
$user_name_link = $user_name;
}
add after:
Code:
$mms = '<a href="javascript:mms(\''.$site_sess->url(ROOT_PATH."mms.php?id=".$image_row['image_id']."").'\')"><img border="0" src="'.get_gallery_image("mms.gif").'"></a>';
suche nach:
Code:
"image_file_name" => $image_row['image_media_file'],
füge dahinter ein:
Code:
"mms" => $mms,
2.)
open includes/constants.php
find:
Code:
// If 4images has problems to find out the right URL, define it here.
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
replace with:
Code:
// If 4images has problems to find out the right URL, define it here.
define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash
Don't foget 2 edit the line. Your must set your domain!!!
3.)
open templates/<dein Template>/details.html
find:
Code:
{header}
add after
Code:
<script language="javascript">
function mms(url) {
var winWidth = 500;
var winHeight = 350;
var w = (screen.width - winWidth)/2;
var h = (screen.height - winHeight)/2 - 60;
var name = 'MMS';
var features = 'scrollbars=no,width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
window.open(url,name,features);
}
</script>
You can use the {mms} tag in your details template in order to let users recieve mms.
4.)
open lang/<deine Sprache>/main.php
add:
Code:
//-----------------------------------------------------
//--- Send MMS ----------------------------------------
//-----------------------------------------------------
$lang['mmsheadline'] = "Recieve image over mms";
$lang['imagewidth'] = "Width:";
$lang['imageheight'] = "Height:";
$lang['download'] = "Downlaod";
$lang['id'] = "ID:";
$lang['mmstext'] = "<b>This picture on your mobile</b><br>
<ul>
<li> Choose in the Services-menu 'Go to address'<li> Put the following in the gap:<br> <B>
{url_mms_id}</B><li> Then you see this:<BR> ID: <b>{mms_id}</b><br><b>Ok, Download</b><li> Choose 'Ok, download'<li> The picture will be loaded. Please be patient.<li> After the download you see the following:<br> <b>File recieved</b><br>Options - back<li> Choose <br> <b>Options > Save</b><li> Rename the picture and choose a folder.<li> <b>Now is the picture on your mobile :-)</b>
</ul>";
5.)
create mms.php add the following code:
Code:
<?php
define('ROOT_PATH', './');
$main_template = 'mms';
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');
$sql = "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE."
WHERE image_id = ".$id."";
$image_row = $site_db->query_firstrow($sql);
$file_size = "n/a";
if ($file_size = @filesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_media_file'])) {
$file_size = format_file_size($file_size);
}
$size = @getimagesize("data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."");
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $mode, $show_link),
"file_size" => $lang['file_size']." ".$file_size,
"width" => $lang['imagewidth']." ".$size[0]." ".$lang['px'],
"height" => $lang['imageheight']." ".$size[1]." ".$lang['px'],
"mmsheadline" => $lang['mmsheadline'],
"text" => $lang['mmstext'],
"mms_id" => $id,
"url_mms_id" => "".SCRIPT_URL."/getmms.php?id=".$id.""
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>
6.)
create getmms.php add the following code:
Code:
<?php
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
if (!$id) {
echo $lang['error'];
exit;
}
$sql = "SELECT image_id, cat_id, image_thumb_file, image_media_file FROM ".IMAGES_TABLE."
WHERE image_id = ".$id."";
$image_row = $site_db->query_firstrow($sql);
echo $lang['id']." ".$id;
echo "
<br>
<a href=\"".SCRIPT_URL."/data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."\">".$lang['download']."</a>";
?>
7.)
create templates/<dein Template>/mms.html
you can use the following tags:
- {mmsheadline} to show the headline
- {text} to show the helptext
- {thumbnail} to show the image
- {width} to show the width
- {height} to show the height
- {file_size} to show the file size
Possible example of the template:Code:
<html>
<head>
<title>{site_name}</title>
<link rel="stylesheet" href="{template_url}/style.css">
</head>
<body bgcolor="#001B8B" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" text="#FFFFFF">
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<td class="head1" height="19">{mmsheadline}</td>
</tr>
<tr>
<td class="head1">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="row2">{text}</td>
</tr>
</table>
</td>
<td class="head1">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="row2" align="center">{thumbnail}<p>{file_size}<p>{widh}<p>{height}</td>
</tr>
</table>
</body>
</html>
create a new button templates/<dein Template>/images/mms.gif
Done!
Some information about the mod:
The thumbnails must be max. 128x128 px and the file size shouldn't be heigher than von 18 kb..
DEMO: http://crazyfunpics.de
-
mematola : That MMS mod doesnt work.. the option to do the MMS thing aint appearing
-
Sorry, its not my mod! I have found this on google!
-
this i wisched to open in this topic
[Mod] Add-Remove image to-from lightbox without page refresh
and this was the error
An Error Has Occurred!
The topic or board you are looking for appears to be either missing or off limits to you.
why this happen?
-
I've updated the link, thanks.
-
I miss still the following MOD's, which I already installed on my page :
1.[MOD] Lightbox-Counter on any Page and ACP (by disparos)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=12154
2.[MOD] Preview Comments (by rproctor)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=13071
3.[MOD] Send HTML-Postcards in Mailboxes (by cheribibi)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=14564
4.[MOD] User's latest Image in Profile (by v@no)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=13196
5.[MOD] Featured Images (by sigma / rproctor)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=14165
6.[MOD] Slideshow V2.2 Also For Lightbox (by Fugaziman)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=22293
7.[MOD] Making A Simple Guestbook (by rustynet)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=6975
8.[MOD] Images Details ON / OFF (by party-cam.org)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=7259
9.[MOD] Contact Form (by vividviews)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=11953
10.[MOD] Eigene Bilder/Menue-Link (by Cr@sy Sash)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=9703
11.[MOD] E-Card Counter (by Crasy Sash)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=6978
I hope, there is no double post ... :?
mawenzi
-
thank you. I've added them into the list.
-
Dear Sir,
Hi,
When the following mode will be available.
3.[MOD] Send HTML-Postcards in Mailboxes (by cheribibi)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=14564
Thanks
-
When the following mode will be available.
3.[MOD] Send HTML-Postcards in Mailboxes (by cheribibi)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=14564
probably never, untill someone finds the post. (as u should see, this topic is listed as missing.
-
When the following mode will be available.
3.[MOD] Send HTML-Postcards in Mailboxes (by cheribibi)
old URL : http://www.4homepages.de/forum/viewtopic.php?t=14564
probably never, untill someone finds the post. (as u should see, this topic is listed as missing.
That's it! I am back! 8)
I have this complete mod but there are attached files (bigger than 128 KB...) and I do not know how to put them (at the moment) in downloading... :oops:
If somebody has a solution...
-
Dear Sir,
Thanks for your reply , Can u send me through email masterzmind2004@yahoo.com
i m waiting
Thanks
-
send it to V@no and send it to me business@wombat.ch i will put them on a server!
sincerly
vincent
-
Hi! Have anyone this mods: "Top Posters" and "Images Details ON / OFF"??? Please, if your have this mods, post its here.
-
This mod was here before hack and I just published readmet.txt and uploaded zip files to my server! I don't give support for it couse it isn't mine!
Download file here: http://zvoncek.rozica.com/4images_news.zip
##############################################################
## MOD Title: Another Simple News Publishing Mod
## MOD Author: janfy < janfy@cagades.com > http://www.cagades.com/
## MOD Description: Adds news to your 4images gallery
##
## MOD Version: 1.3.0
##
## MOD Topic : http://www.4homepages.de/forum/index.php?topic=6778.0
##
## Installation Level: (Medium)
## Installation Time: 20 Minutes
##
## Files To Edit: - index.php
## - admin/index.php
## - admin/settings.php
## - includes/constants.php
## - lang/english/main.php
## - lang/english/admin.php
## - lang/french/main.php
## - lang/french/admin.php
## - templates/home.html
##
## Included Files: admin/news.php
## includes/rssbuilder.php
## install_news.php
## news.php
## rss.php
## rss_reader.php (simple RSS reader by Richard James Kendall-richard@richardjameskendall.com)
## templates/default/news.html
## templates/default/news_bit.html
## templates/default/news_show.html
##
## MOD Demo : http://www.bestof-sexe.com/4images/
## http://www.bestof-sexe.com/4images/news.php
## http://www.bestof-sexe.com/4images/rss.php
## http://www.bestof-sexe.com/4images/rss_reader.php
##############################################################
##############################################################
## Author Notes:
##
## Only administrator are allowed to publish news
##
##############################################################
## MOD History:
##
## 2004-09-12 - version 1.3.0: -Adding config parameters :
## - number of news to display on homepage
## OR
## - show news of the last X days
## - Allow HTML in news
## - Allow BB-Code in news
## - Allow images (BB-Code) in news
##
## -Display 'New' text for newer news
##
## 2004-08-22 - version 1.2.0: Added RSS generator
## 2004-08-15 - version 1.1.0: Added an 'Archives' page to show old news with pagination
## 2004-08-11 - Added file install_news.php to simply update your DB.
## 2004-08-08 - Version 1.0.0
## - First Release
##
##############################################################
## MOD Todo:
## - Add configuration option to easily configure rss feed
##############################################################
## Before Adding This MOD To Your Gallery, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]---------------------------------
#
includes/constants.php
#
#-----[ FIND ]---------------------------------
#
define('LIGHTBOXES_TABLE', $table_prefix.'lightboxes');
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('NEWS_TABLE', $table_prefix.'news');
#
#-----[ OPEN ]---------------------------------
#
index.php
#
#-----[ FIND ]---------------------------------
#
unset($categories);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-----------------------------------------------------
// ----- Show news ------------------------------------
//-----------------------------------------------------
if (!isset($config['news_home_display']) || $config['news_home_display'] == 1)
$sql = "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." ORDER BY news_date DESC LIMIT 0, ".((isset($config['news_nb']))?$config['news_nb']:5);
else if ($config['news_home_display'] == 2)
$sql = "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." WHERE news_date > ".(time() - ((isset($config['news_nb_days']))?$config['news_nb_days']:15)*86400)." ORDER BY news_date DESC";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$news = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$news .= $lang['no_news'];
$news .= "</td></tr></table>";
}
else {
$news = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
while ($image_row = $site_db->fetch_array($result))
{
$news .= "<tr class=\"imagerow1\">\n";
$news .= "<td width=\"100%\" valign=\"top\">\n";
$new_is_new = ($image_row['news_date'] > time() - ((isset($config['news_cutoff']))?$config['news_cutoff']:3)*86400);
$news .= "<b>".$image_row['news_title']."</b>".(($new_is_new)?" <sup class=\"new\">".$lang['new']."</sup>":"").sprintf($lang['news_posted_by'], $image_row['user_name'], format_date($config['date_format']." ".$config['time_format'], $image_row['news_date']));
$news .= "\n</td>\n";
$news .= "</tr>\n";
$news .= "<tr class=\"imagerow2\">\n";
$news .= "<td width=\"100%\" valign=\"top\">\n<br/>";
$news .= format_text($image_row['news_text'], ((isset($config['news_html']))?$config['news_html']:0), 0, ((isset($config['news_bbcode']))?$config['news_bbcode']:1), ((isset($config['news_bbcodeimg']))?$config['news_bbcodeimg']:1));
$news .= "<br/><br/>\n</td>\n";
$news .= "</tr>\n";
} // end while
$news .= "</table>\n";
} // end else
$site_template->register_vars(array(
"news" => $news,
"news_archives" => $lang['news_archive'],
"news_main" => $lang['news_main']
));
unset($news);
#
#-----[ OPEN ]---------------------------------
#
admin/index.php
#
#-----[ FIND ]---------------------------------
#
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
#
#-----[ AFTER, ADD ]------------------------------------------
#
show_nav_header($lang['news_main']);
show_nav_option($lang['news_add'], "news.php?action=addnews");
show_nav_option($lang['modify_news'], "news.php?action=modifynews");
#
#-----[ OPEN ]---------------------------------
#
lang/english/main.php
#
#-----[ FIND ]---------------------------------
#
$lang['delete'] = "[Delete]";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['news_main'] = 'News';
$lang['no_news'] = 'No news';
$lang['news_deleted'] = ' news deleted';
$lang['newss_deleted'] = ' news deleted';
$lang['news_deletion'] = 'News deletion';
$lang['newss'] = 'news';
$lang['news'] = 'news';
$lang['news_modified'] = 'News modified successfully.';
$lang['news_modified_nok'] = 'Error during news modification.';
$lang['news_deletion_confirmation'] = 'Do you really want to delete the %s selected news.';
$lang['edit_news_title'] = 'News #%d posted by %s';
$lang['news_title'] = 'Title';
$lang['news_content'] = 'Content';
$lang['news_date'] = 'Date';
$lang['modify_news'] = 'Edit news';
$lang['news_author'] = 'Author';
$lang['news_add'] = 'Add a news';
$lang['news_add_ok'] = 'News added successfully.';
$lang['news_posted_by'] = ' -- Posted by <b>%s</b> on <i>%s</i>';
$lang['news_archive'] = 'Archives';
$lang['page'] = 'Page';
#
#-----[ OPEN ]---------------------------------
#
lang/french/main.php
#
#-----[ FIND ]---------------------------------
#
$lang['delete'] = "[Supprimer]";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['news_main'] = 'Nouvelles';
$lang['no_news'] = 'Pas de nouvelle';
$lang['news_deleted'] = ' nouvelle supprimée';
$lang['newss_deleted'] = ' nouvelles supprimées';
$lang['news_deletion'] = 'Suppression de news';
$lang['newss'] = 'nouvelles';
$lang['news'] = 'nouvelle';
$lang['news_modified'] = 'Nouvelle modifiée avec succčs';
$lang['news_modified_nok'] = 'Erreur lors de la modification de la nouvelle.';
$lang['news_deletion_confirmation'] = 'Etes vous sur de vouloir supprimer la(les) %s nouvelle(s) sélectionnée(s)';
$lang['edit_news_title'] = 'Nouvelle #%d postée par %s';
$lang['news_title'] = 'Titre';
$lang['news_content'] = 'Contenu';
$lang['news_date'] = 'Date';
$lang['modify_news'] = 'Editer les nouvelles';
$lang['news_author'] = 'Auteur';
$lang['news_add'] = 'Ajouter une nouvelle';
$lang['news_add_ok'] = 'Nouvelle ajoutée avec succés.';
$lang['news_posted_by'] = ' -- Posté par <b>%s</b> le <i>%s</i>';
$lang['news_archive'] = 'Archives';
$lang['page'] = 'Page';
#
#-----[ OPEN ]---------------------------------
#
template/default/home.html
#
#-----[ FIND ]---------------------------------
#
{whos_online}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="head1">{news_main}</td>
<td class="head1" align="right"><a class="head1" href="news.php">{news_archives}</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1" colspan="2">{news}</td>
</tr>
</table>
<br />
#
#-----[ OPEN ]---------------------------------
#
lang/english/admin.php
#
#-----[ FIND ]---------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*-- Setting-Group 8 --*/
$setting_group[8] = "News";
$news_display_optionlist = array(
"1" => "Show the last 'X' news",
"2" => "Show news of the last 'X' days",
);
$setting['news_home_display'] = "News display mode";
$setting['news_nb'] = "News number";
$setting['news_nb_days'] = "Days number";
$setting['news_cutoff'] = "Number of days each news is marked as new";
$setting['news_html'] = "Allow HTML in news";
$setting['news_bbcode'] = "Allow BB-Code in news";
$setting['news_bbcodeimg'] = "Allow images (BB-Code) in news";
#
#-----[ OPEN ]---------------------------------
#
lang/french/admin.php
#
#-----[ FIND ]---------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*-- Setting-Group 8 --*/
$setting_group[8] = "Nouvelles";
$news_display_optionlist = array(
"1" => "Afficher les 'X' derničres nouvelles",
"2" => "Afficher les nouvelles des 'X' derniers jours",
);
$setting['news_home_display'] = "Mode d'affichage des nouvelles";
$setting['news_nb'] = "Nombre de nouvelles";
$setting['news_nb_days'] = "Nombre de jours";
$setting['news_cutoff'] = "Nombre de jours ou la nouvelle est considérée comme 'nouvelle'";
$setting['news_html'] = "Autoriser le HTML dans les nouvelles";
$setting['news_bbcode'] = "Autoriser le BB-Code dans les nouvelles";
$setting['news_bbcodeimg'] = "Autoriser les images (BB-Code) dans les nouvelles";
#
#-----[ OPEN ]---------------------------------
#
admin/settings.php
#
#-----[ FIND ]---------------------------------
#
show_setting_row("highlight_admin", "radio");
#
#-----[ AFTER, ADD ]------------------------------------------
#
show_table_separator($setting_group[8], 2, "#setting_group_8");
show_setting_row("news_home_display", "show_news_display_options");
show_setting_row("news_nb");
show_setting_row("news_nb_days");
show_setting_row("news_cutoff");
show_setting_row("news_html", "radio");
show_setting_row("news_bbcode", "radio");
show_setting_row("news_bbcodeimg", "radio");
#
#-----[ FIND ]---------------------------------
#
// end of functions
#
#-----[ BEFORE, ADD ]------------------------------------------
#
function show_news_display_options($setting_name, $setting_value) {
global $news_display_optionlist;
foreach ($news_display_optionlist as $key => $val) {
echo "<input type=\"radio\" name=\"setting_item[".$setting_name."]\" value=\"$key\"";
if ($setting_value == $key) {
echo " checked=\"checked\"";
}
echo "> ".$val."<br />";
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#
#-----[ DATABASE UPDATE ]------------------------------------------
#
Open a web browser and open the page http://your_domain/4images_dir/install_news.php
to update the database
In addition of this MOD, for those who'd like to add news from the ' archives ' page (administrative level access only - > strongly recommended),
go to your : /news.php file and
find :
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/news.php?action=editnews&news_id=".$news_row[$i]['news_id'])."\" target=\"admin_edit\">".$lang['edit']."</a> ";
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/news.php?action=removenews&news_id=".$news_row[$i]['news_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>";
replace with :
$admin_links .= ($user_info['user_level'] != ADMIN) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."admin/news.php?action=addnews")."\" target=\"admin_add\">".$lang['add']."</a> ";
$admin_links .= ($user_info['user_level'] != ADMIN) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."admin/news.php?action=editnews&news_id=".$news_row[$i]['news_id'])."\" target=\"admin_edit\">".$lang['edit']."</a> ";
$admin_links .= ($user_info['user_level'] != ADMIN) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."admin/news.php?action=removenews&news_id=".$news_row[$i]['news_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>";
Then, go to your lang/main.php file,
find :
//-----------------------------------------------------
//--- Admin Links -------------------------------------
//-----------------------------------------------------
$lang['edit'] = "[Edit]";
$lang['delete'] = "[Delete]";
replace with :
//-----------------------------------------------------
//--- Admin Links -------------------------------------
//-----------------------------------------------------
$lang['add'] = "[Add]";
$lang['edit'] = "[Edit]";
$lang['delete'] = "[Delete]";
Then, visit your archives page (from your gallery - not admin) by logging into your admin account and you should see the additional : ' [add] ' link. ;)
-
Hi! Have anyone this mods: "Top Posters" and "Images Details ON / OFF"??? Please, if your have this mods, post its here.
:oops: i dont know why i cannot open a new topic in the Mods & Plugins board i can only reply... then thank you to the administrators to move this post toward the right board.
ok now, here the mod that i find again (original by party-cam.org) : Image Details on/off in cateogories.php
with this mod, you can choose to display/hide thumbs details in categories.php (and others files???)
>> 03 files to edit from 4images root:
[change]/include/page_header.php
[change]categories.php
[change]/templates/<yourtemplate>/categories.html
>> 02 new file to create from 4images root:
[new]templates/<yourtemplate>/thumbnail_bit_more.html
[new]templates/<yourtemplate>/set_details_dropdown_form.html
First, backup your files.
------ Installation ------
STEP 1:
open page_header.php
search :
//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
and add before:
//-------------------------------------------[ [Mod] Image Details on/off in cateogories.php ]
//-----------------------------------------------------
//--- Set Details Dropdown ----------------------------
//-----------------------------------------------------
if (isset($HTTP_POST_VARS['set_details'])) {
// if ($set_details) {
$site_sess->set_session_var("set_details", $set_details);
$session_info['set_details'] = $set_details;
// }
}
$set_details_dropdown = "\n<select name=\"set_details\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['setimgdetails'].submit() }\" class=\"setperpageselect\">\n";
if ( $session_info['set_details'] == 'an' )
{
$set_details_dropdown .= "<option value=\"aus\">yes</option>\n";
$set_details_dropdown .= "<option value=\"an\" selected=\"selected\">no</option>\n";
}
else
{
$set_details_dropdown .= "<option value=\"aus\" selected=\"selected\">oui</option>\n";
$set_details_dropdown .= "<option value=\"an\" >non</option>\n";
}
$set_details_dropdown .= "</select>";
if ($cat_id != 0) {
$set_details_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
}
if (isset($show_result) && $show_result == 1) {
$set_details_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
}
$site_template->register_vars("set_details_dropdown", $set_details_dropdown);
$set_details_dropdown_form = $site_template->parse_template("set_details_dropdown_form");
$site_template->register_vars("set_details_dropdown_form", $set_details_dropdown_form);
$site_template->un_register_vars("set_details_dropdown");
unset($set_details_dropdown);
unset($set_details_dropdown_form);
//-------------------------------------------[/[Mod] Image Details on/off in cateogories.php ]
STEP 2 :
open categories.php
STEP 2.1 - find :
$templates_used = 'categories,category_bit,thumbnail_bit';
replace by :
//-------------------------------------------[ [Mod] Image Details on/off in cateogories.php ]
//$templates_used = 'categories,category_bit,thumbnail_bit'; // original code
if ( $session_info['set_details'] == 'an' )
{ $templates_used = 'categories,category_bit,thumbnail_bit_more'; }
else
{ $templates_used = 'categories,category_bit,thumbnail_bit'; }
//-------------------------------------------[/[Mod] Image Details on/off in cateogories.php ]
STEP 2.2 - find :
$thumbnails .= $site_template->parse_template("thumbnail_bit");
replace by :
//-------------------------------------------[ [Mod] Image Details on/off in cateogories.php ]
// $thumbnails .= $site_template->parse_template("thumbnail_bit"); // original code
if ( $session_info['set_details'] == 'an' ) {
$thumbnails .= $site_template->parse_template("thumbnail_bit_more"); }
else {
$thumbnails .= $site_template->parse_template("thumbnail_bit");
}
//-------------------------------------------[/[Mod] Image Details on/off in cateogories.php ]
STEP 3 :
open categories.html in your template dir
find :
<td>{category_dropdown_form}</td>
add after :
<td>{set_details_dropdown_form}</td> <!-- -[ [Mod] Image Details on/off in cateogories.php ]- -->
STEP 4 :
create a new file thumbnail_bit_more.html in your template dir with this code:
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
<!-- -[ [Mod] Image Details on/off in cateogories.php ]- detail=off -->
<center>
{if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new}<br />
{thumbnail}<br />
<small>{image_name}</small>
</center>
note that it is about my template! modify this code so that it corresponds to your template.
STEP 5 :
create a new file set_details_dropdown_form.html in your template dir with this code:
<form method="post" name="setimgdetails" action="{self}"><!-- -[ [Mod] Image Details on/off in cateogories.php ] -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td nowrap>Afficher les détails des images? </td>
<td nowrap>{set_details_dropdown} </td>
<noscript> <td>
<input type="submit" value="{lang_go}" name="submit" class="button"/>
</td> </noscript>
</tr>
</table>
</form>
------ END of Installation ------
now whatch your gallery in category.php between category dropdown form and set per page dropdown form : choose no to hide thumbs détails in your category or choose yes to display thumbs détails.
-
:oops: i dont know why i cannot open a new topic in the Mods & Plugins board i can only reply... then thank you to the administrators to move this post toward the right board.
because I was tired moving every day 3-4 new topics absolutly not related to the MODs, now only admins and moderators are able post there, and obviosly they can move topics there too if needed.
So, please start a new topic somewhere and a moderator or administrator will move it to the MODs forum for u ;)
-
this is another one : [MOD] Contact Form (by vividviews)
>> 01 file to modify from 4images root:
[change]includes/functions.php
>> 04 new file to create from 4images root:
[new]contact.php
[new]templates/<yourtemplate>/contact.html
[new]templates/<yourtemplate>/contact_mailform.html
[new]lang/<your_language_dir>/email/contactform_message.html
First, backup your files.
------ Installation ------
STEP 1:
open /includes/functions.php
find :
function check_email($email) {
return (preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) ? 1 : 0;
}
replace by:
//-------------------------------------------[ [Mod] Contact form]
/*
function check_email($email) {
return (preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) ? 1 : 0;
}
*/
function check_email($email) {
// original code return (preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) ? 1 : 0;
return(!MailChek($email, 2)); // Mod
}
function MailChek($Addr, $Level, $Timeout = 15000) {
// Valid Top-Level Domains
$gTLDs = "com:net:org:edu:gov:mil:int:arpa:aero:biz:coop:info:museum:name:";
$CCs = "ad:ae:af:ag:ai:al:am:an:ao:aq:ar:as:at:au:aw:az:ba:bb:bd:be:bf:".
"bg:bh:bi:bj:bm:bn:bo:br:bs:bt:bv:bw:by:bz:ca:cc:cf:cd:cg:ch:ci:".
"ck:cl:cm:cn:co:cr:cs:cu:cv:cx:cy:cz:de:dj:dk:dm:do:dz:ec:ee:eg:".
"eh:er:es:et:fi:fj:fk:fm:fo:fr:fx:ga:gb:gd:ge:gf:gh:gi:gl:gm:gn:".
"gp:gq:gr:gs:gt:gu:gw:gy:hk:hm:hn:hr:ht:hu:id:ie:il:in:io:iq:ir:".
"is:it:jm:jo:jp:ke:kg:kh:ki:km:kn:kp:kr:kw:ky:kz:la:lb:lc:li:lk:".
"lr:ls:lt:lu:lv:ly:ma:mc:md:mg:mh:mk:ml:mm:mn:mo:mp:mq:mr:ms:mt:".
"mu:mv:mw:mx:my:mz:na:nc:ne:nf:ng:ni:nl:no:np:nr:nt:nu:nz:om:pa:".
"pe:pf:pg:ph:pk:pl:pm:pn:pr:pt:pw:py:qa:re:ro:ru:rw:sa:sb:sc:sd:".
"se:sg:sh:si:sj:sk:sl:sm:sn:so:sr:st:su:sv:sy:sz:tc:td:tf:tg:th:".
"tj:tk:tm:tn:to:tp:tr:tt:tv:tw:tz:ua:ug:uk:um:us:uy:uz:va:vc:ve:".
"vg:vi:vn:vu:wf:ws:ye:yt:yu:za:zm:zr:zw:";
// The countries can have their own 'TLDs', e.g. mydomain.com.au
$cTLDs = "com:net:org:edu:gov:mil:co:ne:or:ed:go:mi:aero:biz:coop:info:museum:name:";
$fail = 0;
// Shift the address to lowercase to simplify checking and trim
$Addr = trim(strtolower($Addr));
// Check for spaces
if (ereg(" ", $Addr)) $fail = 1;
// Split the Address into user and domain parts
$UD = explode("@", $Addr);
if (sizeof($UD) != 2 || !$UD[0]) $fail = 1;
// Split the domain part into its Levels
$Levels = explode(".", $UD[1]); $sLevels = sizeof($Levels);
if (!$Levels[0] || !$Levels[1]) $fail = 1;
// Get the TLD, strip off trailing ] } ) > and check the length
$tld = $Levels[$sLevels-1];
$tld = ereg_replace("[>)}]$|]$", "", $tld);
if (strlen($tld) < 2
|| (strlen($tld) > 3 && !ereg(":$tld:", ":arpa:aero:coop:info:museum:name:"))) $fail = 1;
$Level--;
// If the string after the last dot isn't in the generic TLDs or country codes, it's invalid.
if ($Level && !$fail) {
$Level--;
if (!ereg($tld.":", $gTLDs) && !ereg($tld.":", $CCs)) $fail = 2;
}
// If it's a country code, check for a country TLD; add on the domain name.
if ($Level && !$fail) {
$cd = $sLevels - 2; $domain = $Levels[$cd].".".$tld;
if (ereg($Levels[$cd].":", $cTLDs)) { $cd--; $domain = $Levels[$cd].".".$domain; }
}
// See if there's an MX record for the domain
if ($Level && !$fail) {
$Level--;
if (!getmxrr($domain, $mxhosts, $weight)) $fail = 3;
}
// Attempt to connect to port 25 on an MX host
if ($Level && !$fail) {
$Level--;
while (!$sh && list($nul, $mxhost) = each($mxhosts))
$sh = fsockopen($mxhost, 25);
if (!$sh) $fail=4;
}
// See if anyone answers
if ($Level && !$fail) {
$Level--;
set_socket_blocking($sh, false);
$out = ""; $t = 0;
while ($Timeout-- && !$out)
$out = fgets($sh, 256);
if (!ereg("^220", $out)) $fail = 5;
}
if ($sh) fclose($sh);
return $fail;
} //MailChek
//-------------------------------------------[/[Mod] Contact form]
STEP 2:
create a new file contact.php in 4images root with this:
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: member.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
$main_template = "contact";
define('GET_CACHES', 1);
define('ROOT_PATH', './');
define('GET_USER_ONLINE', 1);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
include(ROOT_PATH.'includes/page_header.php');
if ($action == "") {
$action = "mailform";
}
$content = "";
$txt_clickstream = "Contact";
$sendprocess = 0;
$user_id = 1; // CHANGE THIS - Set this to your user id
if ($action == "emailSiteOwner") {
$user_id = (isset($HTTP_POST_VARS[URL_USER_ID])) ? intval($HTTP_POST_VARS[URL_USER_ID]) : 1; // CHANGE THIS - 1 is hardcoded to my user id
$error = 0;
$sender_name = stripslashes(trim($HTTP_POST_VARS['sender_name']));
$sender_email = stripslashes(trim($HTTP_POST_VARS['sender_email']));
$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
$message = stripslashes(trim($HTTP_POST_VARS['message']));
if ($sender_name == "" || $sender_email == "" || $subject == "" || $message == "") {
$msg = $lang['lostfield_error'];
$sendprocess = 1;
$error = 1;
}
if(!$error && $sender_email != "" && MailChek($sender_email, 2)) {
$msg .= (($msg != "") ? "<br />" : "").$lang['invalid_email_format'];
$sendprocess = 1;
$error = 1;
}
if (!$error) {
$user_row = get_user_info($user_id);
$sender_user_name = $sender_name;
$sender_user_email = $sender_email;
// Start Emailer
include(ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_from($sender_user_email, $sender_user_name);
$site_email->set_to("your_mail_adresse@domain.com"); // CHANGE THIS - Set to your email address
$site_email->set_subject("Contact Form: ".$subject); // CHANGE THIS - Set this to whatever prefix you want to appear in the email subject
$site_email->register_vars(array(
"sender_user_name" => $sender_user_name,
"sender_user_email" => $sender_user_email,
"message" => $message,
"site_name" => $config['site_name'],
"site_email" => $config['site_email']
));
$site_email->set_body("contactform_message", $config['language_dir']);
$site_email->send_email();
$msg = $lang['emailuser_success'];
// header("Location: ".ROOT_PATH);
}
else {
$action = "mailform";
}
}
if ($action == "mailform") {
if (!$sendprocess) {
$subject = "";
$message = "";
}
$sender_name = ($user_info['user_level'] != GUEST) ? $user_info['user_name'] : "";
$sender_email = ($user_info['user_level'] != GUEST) ? $user_info['user_email'] : "";
$site_template->register_vars(array(
"sender_name" => $sender_name,
"sender_email" => $sender_email,
"subject" => htmlspecialchars($subject),
"message" => htmlspecialchars($message),
"lang_send_email_to" => $lang['send_email_to'],
"lang_subject" => $lang['subject'],
"lang_message" => $lang['message'],
"lang_submit" => $lang['submit'],
"lang_reset" => $lang['reset']
));
$content = $site_template->parse_template("contact_mailform");
}
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"lang_control_panel" => $lang['control_panel']
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>
STEP 3:
First method:(if you don't want to use my template, go to the second method)
create a new file contact.html in your template dir with this code:
{header}
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center" background="{template_url}/images/logo.gif">
<tr>
<td width="800" height="52" align="center">
<table cellpadding="0" cellspacing="0" width="800" height="50" background="{template_url}/images/logo2.gif" width"180" height="50">
<tr>
<td width="199">
<p align="right"> </p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bordercolor" width="800">
<table width="800" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="638" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="23">
<table width="800" border="0" cellspacing="0" cellpadding="0" background="{template_url}/images/navbar.gif" height="23">
<tr>
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right">
<a href="{url_top_images}"><b>{lang_top_images}</b></a>
<a href="{url_new_images}"><b>{lang_new_images}</b></a><b>
<a href="{url_search}">{lang_search}</a>
</b>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="801" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="row2" valign="top">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20" background="{template_url}/images/cat.gif"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">{user_box}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{if random_image} <table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20" background="{template_url}/images/cat.gif"> <img src="../../default/{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="../../default/{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">
<br />
{random_image}
<br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="../../default/{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_image}
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
<td width="610" valign="top"><br />
<span class="title">{site_name}</span><br />
<hr size="1" />
{if msg}<div class="msg">{msg}</div>{endif msg}
<br />
{content}
<p> </p>
<p> </p>
</td>
<td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="803" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="804" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
<tr>
<td width="6"><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" /></td>
<td width="470"> </td>
<td width="320"> </td>
<td width="6"><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
{footer}
OK as you can see it's my template !!! to use your template follow this steps :
Second method:
open error.html in your template dir (this is an example, you can choose another file... but this file is the easiest to modify ;) )
find this :
<b class="title">{lang_error}</b>
<hr size="1" />
<p>{error_msg}</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{category_dropdown_form}</td>
<td align="right">{setperpage_dropdown_form}</td>
</tr>
</table>
and replace by:
<span class="title">{site_name}</span><br />
<hr size="1" />
{if msg}<div class="msg">{msg}</div>{endif msg}
<br />
{content}
and now save this modified file as a new file called contact.html.
STEP 4:
create a new file contact_mailform.html in your template dir with this code:
<table width="100%" class="box">
<thead>
<tr>
<th class="head2">Contact The Web Site Owner</th>
</tr>
</thead>
<tr>
<td><div style="position:relative;">
<table width="100%" cellpadding="6" cellspacing="2" border="0">
<FORM name="contactForm" action="{url_contact}" METHOD="POST">
<tr>
<td align="right" valign="middle"><b>Your Name:</b></td>
<td align="left"><input name="sender_name" type="text" id="sender_name" tabindex="1" value="{sender_name}" size="40" maxlength="50">
</td>
</tr>
<tr>
<td align="right" valign="middle"><b>Your Email:</b></td>
<td align="left"><input name="sender_email" type="text" id="sender_email" tabindex="2" value="{sender_email}" size="40" maxlength="50">
</td>
</tr>
<tr>
<td align="right" valign="middle"><b>{lang_subject}</b></td>
<td align="left"><input name="subject" type="text" id="subject" tabindex="3" value="{subject}" size="40" maxlength="50"></td>
</tr>
<tr>
<td align="right" valign="top"><b>{lang_message}</b></td>
<td align="left" valign="top"><textarea name="message" cols="60" rows="10" wrap="VIRTUAL" id="message" tabindex="4">{message}</textarea>
</td>
</tr>
<tr>
<td> </td>
<td align="left"><input type="hidden" name="action" value="emailSiteOwner" />
<input type="hidden" name="user_id" value="{user_id}" /> <input tabindex="5" type="submit" name="submit" value="{lang_submit}" class="button" style="margin-right:10px; ">
<input tabindex="6" type="reset" name="reset" value="{lang_reset}" class="button">
</td>
</tr>
<script type="text/javascript">
// set focus to form field
cForm = document.getElementById("contactForm");
cForm.sender_name.focus();
</script>
</form>
</table>
<!-- <address style="position:absolute; top: 3px; right: 25px;">
My Contact Name<br>
My Contact Street<br>
My Contact City, Postal Code
</address> -->
</div>
</td>
</tr>
</table>
STEP 5:
create a new file contactform_message.html in /lang/<your_language_dir>/email/ with this code:
This is an email sent by {sender_user_name} ({sender_user_email}) thanks to the contact form.
If this message is spam, contains abusive or other comments you find offensive please contact the webmaster at:
{site_email}
Message sent to you follows:
-------------------------------------------
{message}
STEP 6:
open user_logininfo.html in your template dir
find :
» <a href="{url_control_panel}">{lang_control_panel}</a><br />
add above :
» <a href="{site_url}/4images/contact.php">Contact Form</a><br />
you can do almost the same modification with user_loginform.html if you want to let anyone on your site to contact your site admistrators.
------ End of Installation ------
Have fun! 8)
-
the MOD contact form is back alive
http://www.4homepages.de/forum/index.php?topic=8987.0
sincerly
vincent
-
From my archive:
Installtion is simple:
1. Download the flash file
2. Create a new directory in your templates directory called, "flash" and place the flash file (mp3.swf) inside that folder. (./templates/flash/mp3.swf)
3. Either append or replace the code in your templates/media/mp3.html template with the following code.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="80">
<param name="movie" value="./templates/flash/mp3.swf?id={image_id}">
<param name=quality value=high>
<embed src="./templates/flash/mp3.swf?id={image_id}" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="80"></embed>
</object>
Thats pretty much it, enjoy!
Ibis Fernandez
http://cinestarfilmworks.com
P.S. The mp3 is being called via the download.php script rather than directly from the {images_src}, Im hoping that this will cause every time the mp3 is accessed to be counted as a download
Cheers,
Markus
-
@Maweryk :
Your suggestion can also be used with :
http://www.4homepages.de/forum/index.php?topic=9269.0
;)
-
Mods in my archive:
- calender
- universal paging class
- image details on/off in categories
- cat name in clickstream
- Slideshow v2.2 for lightbox/album
- random more pics
- random new images
- exif
- catimage
- Slideshow
Do you need some of this mods?
Cheers,
Markus
-
- image details on/off in categories
Was this one already done ? 8O
If so, I will stop seeking in my codes. :mrgreen:
As for your archive, you should install this MOD :
http://www.4homepages.de/forum/index.php?topic=9594.0
to present what you have on a more graphical presentation with an easier way to handle your MOD database. ;)
-
Yes! :wink:
Find in includes/page_header.php
//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
ADD BEFORE
//-----------------------------------------------------
//--- Set Details Dropdown ----------------------------
//-----------------------------------------------------
if (isset($HTTP_POST_VARS['set_details'])) {
// if ($set_details) {
$site_sess->set_session_var("set_details", $set_details);
$session_info['set_details'] = $set_details;
// }
}
$set_details_dropdown = "\n<select name=\"set_details\" class=\"setperpageselect\">\n";
if ( $session_info['set_details'] == 'an' )
{
$set_details_dropdown .= "<option value=\"aus\">aus</option>\n";
$set_details_dropdown .= "<option value=\"an\" selected=\"selected\">an</option>\n";
}
else
{
$set_details_dropdown .= "<option value=\"aus\" selected=\"selected\">aus</option>\n";
$set_details_dropdown .= "<option value=\"an\" >an</option>\n";
}
$set_details_dropdown .= "</select>";
if ($cat_id != 0) {
$set_details_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
}
if (isset($show_result) && $show_result == 1) {
$set_details_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
}
$site_template->register_vars("set_details_dropdown", $set_details_dropdown);
$set_details_dropdown_form = $site_template->parse_template("set_details_dropdown_form");
$site_template->register_vars("set_details_dropdown_form", $set_details_dropdown_form);
$site_template->un_register_vars("set_details_dropdown");
unset($set_details_dropdown);
unset($set_details_dropdown_form);
Find in categories.php:
$templates_used = 'categories,category_bit,thumbnail_bit';
REPLACE WITH
if ( $session_info['set_details'] == 'an' )
{ $templates_used = 'categories,category_bit,thumbnail_bit_more'; }
else
{ $templates_used = 'categories,category_bit,thumbnail_bit'; }
Find in categories.php:
$thumbnails = "<table class=forumline width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=1 cellspacing=1>\n";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$thumbnails .= "<td align=center valign=middle>\n";
show_image($image_row);
$thumbnails .= $site_template->parse_template("thumbnail_bit");
$thumbnails .= "\n</td>\n";
$count++;
REPLACE WITH
$thumbnails = "<table class=forumline width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=1 cellspacing=1>\n";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$thumbnails .= "<td align=center valign=middle>\n";
show_image($image_row);
if ( $session_info['set_details'] == 'an' )
{ $thumbnails .= $site_template->parse_template("thumbnail_bit_more"); }
else
{ $thumbnails .= $site_template->parse_template("thumbnail_bit"); }
$thumbnails .= "\n</td>\n";
$count++;
create file - set_details_dropdown_form.html :
<form method="post" action="{self}">
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<td nowrap=nowrap>Infos & Buttons: </td>
<td>{set_details_dropdown}</td>
<td> <input type="submit" value="{lang_go}" class="button" name="submit" /></td>
</tr>
</table>
</form>
upload in templates/default
Make a copy of thumbnail_bit.html
save as thumbnail_bit_more.html
adjust thumbnail_bit.html
e.g. just
{thumbnail}
insert the TAG {set_details_dropdown_form} in categories.html to insert the Select Form.
FINISHED
Demo:
http://www.party-cam.org/cam/categories.php?cat_id=255
Cheers,
Markus
-
Outstanding. :D
This has saved me a huge time of codings. In the mean time, I will combine this with my ' site maintenance MOD ' I created. ;)
However, I do have a statement to add :
<form method="post" action="{self}">
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<td nowrap=nowrap>Infos & Buttons: </td>
<td>{set_details_dropdown}</td>
<td> <input type="submit" value="{lang_go}" class="button" name="submit" /></td>
</tr>
</table>
</form>
replace with :
<form method="post" action="{self}">
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<td nowrap=nowrap>{lang_info_buttons}</td>
<td>{set_details_dropdown}</td>
<td> <input type="submit" value="{lang_go}" class="button" name="submit" /></td>
</tr>
</table>
</form>
Then, in your includes/page_header.php file,
find :
"lang_charset" => $lang['charset'],
add above :
"lang_info_buttons" => $lang['info_buttons'],
Then, in your lang/english/main.php file,
add above the ?> tag :
$lang['info_buttons'] = "Infos & Buttons: ";
Again, excellent idea. ;)
-
Was this one already done ? 8O
Yes it had already been published here in this post (http://www.4homepages.de/forum/index.php?topic=6787.msg41507#msg41507) some months ago but it was not moved as it had been asked :roll:
I hope that somebody will make it... one day... :wink:
-
Ohhh ! I see what happened. It was posted in the middle on another topic. Who would of though ? ! :mrgreen:
Thanks for mentionning this. This MOD should even be on it's own topic as a sticky position under the MODs section of the forum. ;)
-
Did you try going to http://web.archive.org/ ??
I looked and I see they have many things from the forum archived back to June 2002.
Here is the quick link back to the history of the forum: http://web.archive.org/web/*/http://www.4homepages.de/forum/
Hope this helps out!
-
Unfortunetly all they have is home page of this forum, all links open current pages.
-
Unfortunetly all they have is home page of this forum, all links open current pages.
Sorry about that. Didn't look that far into it.
I will keep an eye out for things like this.
-
http://www.4homepages.de/forum/index.php?topic=10163.0
-
noch einen gefunden
[MOD] Panoramen + Java-Applet: Zusammenfassung
http://www.4homepages.de/forum/index.php?topic=10250.new#new
-
Kann es sein, dass unter folgendem Link
http://www.4homepages.de/forum/index.php?topic=9996.msg52137#msg52137
zumindest ein Teil vom
[MOD] Featured Images (by sigma / rproctor)
zu finden ist?
Ich glaueb om6acw hat das Mod etwas abgändert, aber die Änderungen müsste man doch rückgängig machen können, oder :wink:
Gruß
Matthias
-
Kann es sein, dass unter folgendem Link
http://www.4homepages.de/forum/index.php?topic=9996.msg52137#msg52137
zumindest ein Teil vom
[MOD] Featured Images (by sigma / rproctor)
zu finden ist?
Ich glaueb om6acw hat das Mod etwas abgändert, aber die Änderungen müsste man doch rückgängig machen können, oder :wink:
Gruß
Matthias
Hi Matthias70,
I have instaled this mod on 1.7.1 but when I switch to 1.7.2 I lost that mod.
But I want instal him again. If is somebody here who want dig that mod out
from my old (1.7.1) instalation I can send him all scripts.
-
Hello om6acw,
thanks for your answer.
Unfortunaltly I'm not good in digging things out in php :cry:
Matthias
-
Hello,
I've seen on this forum that the MMS mod is still not available.
I've found a couple of files on my computer of this mod.
I hope someone is able to adjust these files.
regards,
Jan
-
this page doesn't updated from along time :(