Jump to content

dcuellar

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dcuellar's Achievements

Member

Member (2/5)

0

Reputation

  1. Care to share your fix? Are you creating a mod for vbulletin?
  2. I meant to type the code tag, but I guess it automatically coded it.
  3. This is the code I have right now to automatically convert urls: $urlReplaceArray = array( "[url]\\2\\4[/url]" ); What I'd like to do is change it from to if within a specified forum (more than one forum), and the default [url] otherwise. I imagine it would require an IF and ELSE somewhere in there...
  4. now, what about the path of these php pages? my links page is under the root, but my store is not. links=public_html/links/index.php store=public_html/forum/cartplog.php
  5. So I would replace the 'index.php' with the page I am viewing? And, let's say for example I wanted to use all of the photos I have currently for this page...would I insert them between the {}? After the //display one photo? or would it be replacing the "//display one photo"?
  6. Hello all! I'd like to take the following and add a condition to it. I'd like for the photos to show up if they are on a certain page. For example, I have this system embedded on two pages. One for an online store and one for a linking system. I'd like to show these pictures while in the store, but another set of pictures while viewing the links page.
  7. Hello! I'm having problems getting this options box to work. http://www.unifiedchamp.com/ucforum/cartplog.php?do=viewitem&cartplogproductid=22 The first option box to the left was what came originally with the program. The second was what I have added. Here is the php code: if ($_REQUEST['do'] == 'viewitem') { $vbulletin->input->clean_array_gpc('r', array( 'cartplogproductid' => TYPE_UINT, )); $cartplog['productid'] = $vbulletin->GPC['cartplogproductid']; $cartplog_product_check = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "cartplog_products WHERE productid = " . intval($cartplog['productid']) . " "); if ($cartplog_product_check) { $cartplog['product_productid'] = intval($cartplog_product_check['productid']); $cartplog['product_thumb'] = strval($cartplog_product_check['thumb']); $cartplog['product_title'] = htmlspecialchars_uni($cartplog_product_check['title']); $cartplog['product_description'] = strval($cartplog_product_check['description']); $cartplog['product_price'] = round(floatval($cartplog_product_check['price']), 2); $cartplog['product_options'] = ''; $cartplog['product_options2'] = ''; //Fix productprice $cartplog['product_price'] = '$' . number_format($cartplog['product_price'], 2); $cartplog_product_options = array_map('trim', unserialize($cartplog_product_check['options'])); $cartplog_product_options2 = array_map('trim', unserialize($cartplog_product_check['options2'])); if (!is_array($cartplog_product_options)) { $cartplog_product_options = array(); } if (!is_array($cartplog_product_options2)) { $cartplog_product_options2 = array(); } foreach($cartplog_product_options AS $cartplog_options_key => $cartplog_options_title) { if (vbstrlen($cartplog_options_title)) { $cartplog['options_title'] = htmlspecialchars_uni($cartplog_options_title); $cartplog['product_options'] .= '<option value="' . $cartplog['options_title'] . '">' . $cartplog['options_title'] . '</option>'; $cartplog['product_options'] .= "\n"; } } foreach($cartplog_product_options2 AS $cartplog_options_key => $cartplog_options_title) { if (vbstrlen($cartplog_options_title)) { $cartplog['options_title'] = htmlspecialchars_uni($cartplog_options_title); $cartplog['product_options2'] .= '<option value="' . $cartplog['options_title'] . '">' . $cartplog['options_title'] . '</option>'; $cartplog['product_options2'] .= "\n"; } } if ($cartplog['product_options']) { $cartplog['product_options'] = '<select name="cartplogoptions">' . $cartplog['product_options'] . '</select>'; } if ($cartplog['product_options2']) { $cartplog['product_options2'] = '<select name="cartplogoptions2">' . $cartplog['product_options2'] . '</select>'; } $navbits = array(); $navbits['cartplog.php' . $vbulletin->session->vars['sessionurl_q']] = htmlspecialchars_uni($vbphrase['cartplog']); $navbits[''] = htmlspecialchars_uni($vbphrase['cartplog_view_item']); $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('cartplog_view_item') . '");'); } else { $cartplog_url = 'cartplog.php?' . $vbulletin->session->vars['sessionurl'] . 'do=viewindex'; exec_header_redirect($cartplog_url); exit(); } } Anywhere you see the number 2 following the word options is what I have added. Some of this may not even need to be in there as I am just using trial and error. Let me know what you think I can do. The drop down box to the right should reflect options for color. These colors have already been inputted through my admincp. Let me know if you need to take a look at the full php script.
  8. This is the code within my php for the input box on my control panel. print_input_row($vbphrase['cartplog_http_link_to_thumb'], 'cartplogthumb', $cartplog_product_info['thumb']); The data inputed would be the http link to the picture we want to use as a thumb. I would like to get that http link so I can <a href the thumbnail to the full size picture. Help?
  9. I never said I made it from scratch. I forgot, this forum has members with so much knowledge in creating websites that I didn't think you wanted to critique more than just my choice of template, colors, placement, content. I'm sorry, I'll just stick to posting at other forums with lesser mortals all mighty TheFilmGod.
  10. I'm really starting from scratch here, and to top it off I don't know much. this is what I have before the main script: <?php /********************************************************************************************* CartPlog Lite License ============================================================================================== This software is as-is, no warranty of any kind, use at your own risk. You are granted free use of this software. However, you are not permitted under any circumstances to redistribute the software, whether in whole or in part. Also, the 'powered by' links must remain intact and visible. Make sure to understand that this is *not GPL software. Do not redistribute it, and do not use parts of it in other software. This software is copyrighted in its entirety to 'calorie' a/k/a � ThinkDing LLC 2007, all rights reserved. The software author/entity are in no way responsible for your site content. All copyright notices and 'powered by' links must not be changed or removed. Do not use this software if obtained from a warez site! *********************************************************************************************/ // ####################### SET PHP ENVIRONMENT ############################ error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ######################## define('THIS_SCRIPT', 'cartplog'); define('CARTPLOG_VERSION', 'Lite v.1.0.0'); if ($_REQUEST['do'] == 'postback') { define('SKIP_SESSIONCREATE', 1); } // ################### PRE-CACHE TEMPLATES AND DATA ####################### if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'viewindex'; } $phrasegroups = array('cartplogfrontend'); $specialtemplates = array(); $globaltemplates = array(); $actiontemplates = array( 'checkout' => array( 'cartplog_basket_item', 'cartplog_view_cart' ), 'viewcart' => array( 'cartplog_basket_item', 'cartplog_view_cart' ), 'viewcategory' => array( 'cartplog_category_item', 'cartplog_view_category' ), 'viewhistory' => array( 'cartplog_history_item', 'cartplog_history_list', 'cartplog_view_history' ), 'viewindex' => array( 'cartplog_category_list', 'cartplog_basket_summary', 'cartplog_product_item', 'cartplog_view_index' ), 'viewitem' => array( 'cartplog_view_item' ) ); // ####################### REQUIRE VB BACK-END ############################ // cartplog in main forum directory require_once('./global.php'); // ###################### CHECK CARTPLOG ACCESS ########################### // #################### INITIALIZE SOME VARIABLES ######################### $cartplog = array(); // do not remove this !!! // do not hide, change, remove, etcetera !!! $cartplog['powered_by'] = '<br /><div class="smallfont" align="center"><a href="http://www.photoplog.com/">' . $vbphrase['cartplog_powered_by_cartplog'] . ' ' . CARTPLOG_VERSION . '</a></div>'; // do not hide, change, remove, etcetera !!! $footer = $cartplog['powered_by'] . $footer; $cartplog_currencies = array('AUD', 'CAD', 'EUR', 'GBP', 'USD'); $cartplog['currency_code'] = 'USD'; if (isset($cartplog_currencies[$vbulletin->options['cartplog_currency']])) { $cartplog['currency_code'] = $cartplog_currencies[$vbulletin->options['cartplog_currency']]; } // #################### INITIALIZE COOKIE SESSION ######################### if ($_REQUEST['do'] != 'postback') { $vbulletin->input->clean_array_gpc('c', array( COOKIE_PREFIX . 'cartplog' => TYPE_NOHTML )); $cartplog['cookie'] = $vbulletin->GPC[COOKIE_PREFIX . 'cartplog']; if ($cartplog['cookie']) { $cartplog_count_check = $db->query_first("SELECT COUNT(*) AS cnt FROM " . TABLE_PREFIX . "cartplog_sessions WHERE userid = " . intval($vbulletin->userinfo['userid']) . " AND sessionid = '" . $db->escape_string($cartplog['cookie']) . "' AND completed = 0 "); if ($cartplog_count_check['cnt'] != 1) { $cartplog['cookie'] = ''; vbsetcookie('cartplog', '', false); } } if (empty($cartplog['cookie'])) { $cartplog_hash = rand() . TIMENOW . uniqid(microtime(), true) . $vbulletin->userinfo['userid']; $cartplog['cookie'] = md5($cartplog_hash); $cartplog_flag = true; while ($cartplog_flag) { $cartplog_count_check = $db->query_first("SELECT COUNT(*) AS cnt FROM " . TABLE_PREFIX . "cartplog_sessions WHERE userid = " . intval($vbulletin->userinfo['userid']) . " AND sessionid = '" . $db->escape_string($cartplog['cookie']) . "' "); if ($cartplog_count_check['cnt']) { $cartplog_hash = rand() . TIMENOW . uniqid(microtime(), true) . $vbulletin->userinfo['userid']; $cartplog['cookie'] = md5($cartplog_hash); } else { $cartplog_flag = false; $db->query_write("INSERT INTO " . TABLE_PREFIX . "cartplog_sessions (sessionid, userid, completed, dateline, products) VALUES ( '" . $db->escape_string($cartplog['cookie']) . "', " . intval($vbulletin->userinfo['userid']) . ", 0, " . intval(TIMENOW) . ", 'a:0:{}' ) "); vbsetcookie('cartplog', $cartplog['cookie']); } } } } else if ($_REQUEST['do'] == 'postback') { $vbulletin->nozip = true; } That is my php for the store itself. I don't have a terms and agreement made yet, partly because I don't know how. I'm sorry, my forum was put together by a template and controlled within the adminCP. This is the furthest I've gone away from that. Any help?
  11. I'd like to add an "Agree to terms" page before a visitor is allowed to view my store. Much like what you see before you register for a forum. Can I include that within the PHP? What steps must I take?
  12. nevermind. I tried something and it worked. Thanks, anyways!
  13. Actually, here's the template: <td class="alt1" <if condition="$cartplog_count">style="padding: 25px; border: 1px solid #CCCCCC;" </if>align="center" valign="bottom"> <if condition="$cartplog[product_thumb]"> <img style="$vboptions[cartplog_thumbcss]" src="$cartplog[product_thumb]" alt="" border="0" /> <else /> <img style="$vboptions[cartplog_thumbcss]" src="$stylevar[imgdir_misc]/cartplog_no_image.gif" alt="" border="0" /> </if> <br /> <div class="smallfont"><a href="cartplog.php?$session[sessionurl]do=viewitem&cartplogproductid=$cartplog[product_productid]">$cartplog[product_title]</a></div> <div class="smallfont">$vbphrase[cartplog_price]: $cartplog[product_price] $cartplog[currency_code]</div> <div class="smallfont"><a href="cartplog.php?$session[sessionurl]do=viewcategory&cartplogcatid=$cartplog[product_catid]">$vbphrase[cartplog_view_category]</a></div> </td> I see an a href attached to the [product_title] but I'm not sure where to put it for the thumb.
  14. I'm thinking it's somewhere in here. Someone, anyone? while ($cartplog_product_info = $db->fetch_array($cartplog_product_infos)) { $cartplog['product_productid'] = intval($cartplog_product_info['productid']); $cartplog['product_catid'] = intval($cartplog_product_info['catid']); $cartplog['product_thumb'] = strval($cartplog_product_info['thumb']); $cartplog['product_title'] = htmlspecialchars_uni($cartplog_product_info['title']); $cartplog['product_price'] = round(floatval($cartplog_product_info['price']), 2); eval('$cartplog[\'popular_products\'] .= "' . fetch_template('cartplog_product_item') . '";'); $cartplog['popular_products'] .= '</tr><tr>'; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.