Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

leveera

Pioneers
  • Posts

    230
  • Joined

  • Last visited

Everything posted by leveera

  1. Hi Jack back to my 2c Could you please check how clean is my code for articles_new infobox. Thanks! <?php /* $Id: articles_new.php,v 1.0 2009/07/04 22:07:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $listing_sql = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from ((" . TABLE_ARTICLES . " a), " . TABLE_ARTICLES_TO_TOPICS . " a2t) left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY) order by a.articles_date_added desc, ad.articles_name"; $listing_split = new splitPageResults($listing_sql, MAX_ARTICLES_PER_PAGE); ?> <!-- articles_new //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_NEW_ARTICLES); new infoBoxHeading($info_box_contents, false, false); $rows = 0; if ($listing_split->number_of_rows > 0) { $articles_listing_query = tep_db_query($listing_split->sql_query); $articles_listing = '<table border="0" width="100%" cellspacing="0" cellpadding="1">'; while ($articles_list = tep_db_fetch_array($articles_listing_query)) { $rows++; $articles_listing .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '.</td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_list['articles_id']) . '"><b>' . $articles_list['articles_name'] . '</a></td></tr>'; } $articles_listing .= '</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $articles_listing); new infoBox($info_box_contents); ?> </td> </tr> <!-- articles_new_eof //--> <?php } ?>
  2. Jack, have you tried to build infobox upcoming articles? Just my 2c. Will see if I can and thanks for time you are here for support!
  3. May be some options make it off but I solved it this way. Although the question theoretically exists... <?php } ?> </table></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_ARTICLES_UPCOMING); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_ARTICLE_LISTING); ?></td> </tr> </table></td> <?php } else { // default page ?>
  4. Hi Jack, Thanks for quick responce. Meanwhile I found that problem is in the articles.php since it dont call to modules/articles_upcoming.php Looks like the else operator dont turn on a code from line 269 down <?php } else { // default page ?> What is a condition to turn it on?
  5. Hi Jack, Thanks for the contribution, I use AM1.5.7.1 with no problems except I cant solve a trick how to display Upcoming articles module. I placed a Date Expected for an article and played with Published/Draft switch with no result. In admin articles configuration I have Maximum number of Upcoming articles to display set to 10. My articles.php looks fine with <?php include(DIR_WS_MODULES . FILENAME_ARTICLES_UPCOMING); ?> on place. Have no errors and no shown upcoming articles. Please advice solution. Thanks
  6. Hello, you have answer in error report, FILENAME_GALLERY is unknown for server you forgot to define FILENAME_GALLERY in filenames.php //SIMPLE GALLERY Start define('FILENAME_GALLERY', 'gallery.php'); define('FILENAME_GALLERY_USER', 'gallery_user.php'); //SIMPLE GALLERY End
  7. OK, let me fix boxes/gallery.php for infobox height line 50 $box_text .= '<table border=0 cellpadding=0 cellspacing=0 width="100%" height="155" id="special'.$row.'"> spot "155" it is height in pix, if nessesary change this size to fit your needs.
  8. Now demo site http://demo.oscommerce.com.tr/ has an error in Firefox only, IE looks OK Fatal error: Call to a member function add_current_page() on a non-object in /home/content/g/f/t/gfthdg30sadh3f/html/demo/includes/application_top.php on line 317
  9. No, I have no problems at all now with the contribution (except the box height) I think it may be a reason of some added mods or local server settings. May be resonable to give in Install.txt a two ways for gallery_user.php <form enctype="multipart/form-data" action="gallery_user.php" method="POST"> or <?php echo tep_draw_form('fotouploaden', 'gallery_user.php?osCsid=' . $osCsid ,'post', 'enctype="multipart/form-data"');?>
  10. thanks for upload photo_gallery09 meanwhile some problems to fix includes/boxes/gallery.php line 43 ... why FILENAME_SPECIALS ??? new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SPECIALS)); scandir function is available only from php5 for alll who is under php4 it will breake the box here is a fix, just add on the top before $dir = './gallery/thumbnails/'; // for PHP 4 versions if (PHP_VERSION < 5) { function scandir($dir) { $dh = opendir($dir); while (false !== ($filename = readdir($dh))) { $files[] = $filename; } sort($files); return $files; } } last one. How to fix the box height? It vary now its vertical size in depends of picture format
  11. In my RC1 with image_gallery08 this change stoped image upload, it just redirect to index.php with no upload and no errors. So I back with greate pleasure to <form enctype="multipart/form-data" action="gallery_user.php" method="POST"> Also to solve problem with utf-8 in catalog/gallery_process.php you need to set a proper encoding for the page after require('includes/application_top.php'); add header('Content-type: text/html; charset=UTF-8'); or any charset what match your DB table collation
  12. this change allows to sort and see last uploaded image on the top of catalog/gallery.php in this file replace line 80 to $gallery_query_raw ="select id, cID, pID, comment, title, description from ". TABLE_GALLERY ." order by pID desc";
  13. Is any way to permit upload vertical 800px (height) x 600 px images? Also have to report what first try to upload by admin/gallery_upload.php forward to admin login page, after loging upload goes normaly.
  14. OK, this is because class is not set add in line 116 after echo "\n".'<td align="center" class="main"
  15. There is another trick I cant solve Where is in CSS to edit a font size and syle for a picture title? It is visible on catalog/gallery.php under thumbnails. Whenever I change it doesnt responce :huh:
  16. Ok I fixed broken hightslide script link in catalog/gallery.php I think it is reasonable to have the same syntax of link to highslide in gallery.php and gallery_user.php now in gallery.php, line 25 and 40 hs.graphicsDir = '<?php echo HTTP_SERVER ?>/highslide/graphics/'; and it doesnt functional change path like it is in gallery_users.php hs.graphicsDir = 'highslide/graphics/'; so now both files will work fine
  17. Thank for attention and suggestion. I had to be more clear, my RC1 already is in utf-8 included sql tables as well as the photo gallery tables. Now I think what it could be a problem in hightslide code, why it cant decode utf-8 text from sql tables.
  18. Sent you message with url. The photo_gallery08 unfortunately is not multilingual compatible i.e uft-8 encoded This cause a problem like pictured good article about utf-8 can be read here - ARTICLE It is actually not a problem to convert, just couple of changes, except catalog/gallery_process.php because I cannt understand where in the file to set encoding like this <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  19. Sorry to say but one more problem in catalog/gallery.php No full size pop-up picture, it just open jpg file in the same window (in catalog/gallery_user.php pop-ups work fine)
  20. 1. Following warnings and error page appears in admin on upload if customer is not selected Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /.../admin/gallery_upload.php on line 23 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /..../admin/gallery_upload.php on line 44 Warning: Cannot modify header information - headers already sent by (output started at /.../admin/gallery_upload.php:23) in /..../includes/functions/general.php on line 22 2. Im trying to make it UTF-8 compatable by change collate in SQL injection and converting language files in UTF-8 but still have in catalog/gallery_user.php unreadable preloaded text in Edit pop-up window 3. catalog. (gallery_process.php?edit=yes&pID=.... ) second try to edit title and description show Login page in pop-up window 4. Still not able to load image by customer, no errors but redirect to index.php I have RC1, no STS Would be greateful for help
  21. Im beleive this 2 lines in galery.php are to get out a picture and autor copyright echo "\n".'<td align="center"><a id="autoload'.$fotos['cID'].$fotos['pID'].'" href="' . tep_href_link($dir.$file) . '" class="highslide" onclick="return hs.expand(this,{headingText: \''.$fotos['title'].'\'})">'.tep_image($dir . $file, '', 150, 150, 'hspace="5" vspace="5"').'</a><br>'.stripslashes($fotos['title']); echo '<div class="highslide-caption"><div style="text-align:center;margin-top:-2px;">'.AUTEUR.' '.$auteur['customers_firstname']." ".$auteur['customers_lastname']."</div><p>"; Is it possible to modify first echo to display URL path to a picture? May be to build one more echo line... Thanks for advice!
  22. Thanks Sam! perfect solution, works fine! I use Winsyntax :rolleyes:
  23. I fixed it! simply to add after $count = 0; $ip_update = array(); Please confirm what I did it right because Im not good in PHP at all
  24. I use latest upload http://addons.oscommerce.com/info/1561 on my RC1 but remove IP from the list generate a warning Warning: Variable passed to each() is not an array or object in ...admin/_banned.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /.../_banned.php:10) in /.../admin/_banned.php on line 16 Warning: Cannot modify header information - headers already sent by (output started at /.../_banned.php:10) in /.../_banned.php on line 37 _banned.php //Routine to update the IP addresses if ($HTTP_POST_VARS['ip_update']) { $count = 0; line10 while (list($key, $value) = each($ip_update)) { $sql = "UPDATE banned_ip SET bannedip = '" . $value . "' WHERE id_banned = $key"; $update = tep_db_query($sql); $count_i++; } line16 echo header('Refresh:1;'); $messageStack->add("Changes done, refreshing page.", 'success'); } Any quick ideas how to solve? Thanks
  25. Please advice is ever any photo gallery what joined with OSC. I need a feature to display full path to the images to allow customers to link them outside of Gallery and OSC Thanks Sergei
×
×
  • Create New...