Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Post a Classified button not working

  1. #1
    Thread Starter
    Amateur jillchongva's Avatar
    Join Date
    Oct 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post a Classified button not working

    Hi all!

    The "Post a Classified" button is not working on www.collegepikasso.com/marketplace. Where should that point since the a href is #

    j

  2. #2
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    You have not included the form in your style there. Look at the source, it's not showing.

    Code:
    <?php
    require_once dirname( __FILE__ ) . '/form_process.php';
    get_header( ); 
    include_classified_form( );
    ?>

  3. #3
    Thread Starter
    Amateur jillchongva's Avatar
    Join Date
    Oct 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    And where should that code go please?

    jill

  4. #4
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    At the top of index.php, single.php, page.php etc... it's the very first lines in each file.

    Code:
    <?php
    require_once dirname( __FILE__ ) . '/form_process.php';
    get_header( ); 
    include_classified_form( );
    ?>
    calling the header and post form... maybe you have just got
    <?php get_header( ); ?>
    and no form, or if you have it all right, you maybe missing form_process.php or post-form.php from your theme directory.

  5. #5
    Thread Starter
    Amateur jillchongva's Avatar
    Join Date
    Oct 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    I wouldn't have taken out any of that code - I work with the styling for the most part so I'm not sure why this function isn't working!

    j

  6. #6
    Thread Starter
    Amateur jillchongva's Avatar
    Join Date
    Oct 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    I didn't say a proper thank you - thanks everyone for helping me with this!

    jill

  7. #7
    Amateur
    Not a Verified Customer
    maxborer's Avatar
    Join Date
    May 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    on the index.php

    i used "text"

    But it's not working at all. anyone could please help me?

  8. #8
    Rookie
    Not a Verified Customer
    jekrikken's Avatar
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    It could be a bug with WP ClassiPress. If your firewall or browser has a high security level it doesn't allow the sliding ad form to show up. Many companies raise their security levels to max, so it's a pretty bad bug if you ask me.

  9. #9
    Amateur
    Not a Verified Customer
    maxborer's Avatar
    Join Date
    May 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    it worked well you know with the older version of classipress but the latest one is not working at all.

    the older version one, I used

    test

    but the newest version the tb_show is no more there. they use "<a href="#" id="ad-toggle">test</a"


    anyone could please help me?
    anyone has any idea?

  10. #10
    Rookie
    Not a Verified Customer
    jekrikken's Avatar
    Join Date
    Oct 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Post a Classified button not working

    I did a little tiny hack in ClassiPress header.php. Made a page template and asigned that to a page I called Post classified. After that I edited the post classified button in the header.php to link to my new page.

    Here is the code for the tpl-post-ad.php template file:

    Code:
    <?php
    /*
    Template Name: Post Ad Page
    */
    
    // start main edit page
    require_once dirname( __FILE__ ) . '/form_process.php';
    
    get_header(); 
    ?>
    
    <script type="text/javascript">
    function textCounter(field,cntfield,maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else cntfield.value = maxlimit - field.value.length; }
    </script>
    
    
    
    
    <?php
    $ok = cp_filter($_GET['ok']);
    if ($err != "") { echo "<div id=\"err\" class=\"err\"><div id='closelink'><a href=\"#\" onClick=\"document.getElementById('err').style.display = 'none';\">X</a></div>$err</div>"; }
    
    if ($ok == "ok") {
    	echo "<div class=\"ok\">" . __('Thank you! Your classified ad has been submitted succesfully.','cp') . "
    ";
    	
    if ( get_option("post_status") == "draft" && get_option('activate_paypal') != "yes") { 
    	echo __('Someone will review your ad shortly. If you have any questions, please contact the site owner.','cp') . "
    ";
     }	
    	
    if ( get_option('activate_paypal') == "yes" ) {
    	$post_id = (int)$_GET['id'];
    	$post_title = $_GET['title'];
    	$post_title = str_replace("+", " ", $post_title);
    	$ad_value = get_option('ad_value'); // 10
    	$featured_ad_check = (int)$_GET['fid'];
    	$lprice = (int)$_GET['lprice'];
    	
    	if ($featured_ad_check == '1') {$isfeatured = get_option('cp_featured_ad');}
    	
    	if ( get_option('cp_price_scheme') == "category" ) {
    	
    		$getcatid = $_GET['catid'];  // 21
    		
    		// if cat is blank then assign it the first category
    		if ($getcatid == "") { $getcatid = "1"; }
    		
    		$cat_price = get_option('cp_cat_price_'.$getcatid); // 0
    		
    		// if cat price is blank then assign it default price
    		if ($cat_price != "") { $totalcost = $cat_price; } else { $totalcost = $ad_value; }
    		
    	}
    	
    	elseif( get_option('cp_price_scheme') == "percentage" ) {
    	
    		// first grab the % and then put it into a workable number
    		$ad_percentage = (get_option('cp_ad_percent') * 0.01);
    		
    		// calculate the ad cost. Ad listing price x percentage. 
    		$totalcost =  (trim($lprice) * trim($ad_percentage));
    	
    	} else {
    		$totalcost = $ad_value; 
    	}
    	
    	// calculate the total cost for the ad. 
    	$totalcost_out = $totalcost + $isfeatured;
    	
    	// put the total cost of the ad into a custom field
    	add_post_meta($post_id, 'cp_totalcost', $totalcost_out, true);
    	
    	?>
    
    
    
    <?php if ($totalcost_out != "0") { ?>
    
    
    		<?php _e('Please click the PayPal button below to submit your','cp'); ?> <?php echo get_option('currency'); ?><?php echo $totalcost_out; ?><?php echo get_option('paypal_currency'); ?> <?php _e('listing fee.','cp'); ?>
    <?php _e('Your ad will not be published until payment has been received.','cp'); ?>
    
    
    		<center>
    
    		<?php 
    		if(get_option('paypal_sandbox') == 1){
    			$paypalurl="https://www.sandbox.paypal.com/cgi-bin/webscr";
    		}else {
    			$paypalurl="https://www.paypal.com/cgi-bin/webscr";
    		}
    		?>
    
    		<form target="_blank" action="<?php echo $paypalurl ?>" method="post">
    		   <input type="hidden" name="cmd" value="_xclick">
    		   <input type="hidden" name="business" value="<?php echo get_option('paypal_email'); ?>">
    		   <input type="hidden" name="item_name" value="<?php _e('Classified ad listing on ','cp') ?><?php bloginfo('name'); ?> <?php _e('for','cp') ?> <?php echo get_option("prun_period"); ?> <?php _e('days','cp'); ?>">
    		   <input type="hidden" name="item_number" value="<?php echo $post_id; ?>">
    		   <input type="hidden" name="amount" value="<?php echo $totalcost_out; ?>">
    		   <input type="hidden" name="no_shipping" value="1">
    		   <input type="hidden" name="no_note" value="1">
    		   <input type="hidden" name="notify_url" value="<?php echo get_option('home'); ?>/">
    		   <input type="hidden" name="cancel_return" value="<?php echo get_option('home'); ?>/">
    		   <input type="hidden" name="return" value="<?php echo get_option('home'); ?>/?payment=1">
    		   <input type="hidden" name="currency_code" value="<?php echo get_option('paypal_currency'); ?>">
    		   <input type="hidden" name="bn" value="IC_Sample">
    		   <input type="image" src="<?php bloginfo('template_directory'); ?>/images/paypal_btn.gif" name="submit">
    		   
    		</form>
    
    		<span style="color: red; background-color: #fff; padding: 2px 5px;"><?php _e('IMPORTANT','cp');?></span> <?php _e('Be sure to click RETURN TO STORE (from paypal.com) for your ad to be activated.','cp'); ?>
    		</center>
    		<?php	
    
    	}
    }
    	echo "</div>";
    } 
    ?>
    
    <div class="classform" id="formbox">
    
    
    	<div class='box-yellow'>
    
    		<h3 style="text-align:top;">[img]<?php bloginfo('template_url'); ?>/images/star.png[/img]	
    
    		<?php 
    		// if not charging for any ads 
    		if ( get_option('activate_paypal') != "yes" ) { _e('All ad listings are FREE.','cp'); }
    
    		// if paypal is turned on and NO category-level pricing
    		elseif ( get_option('cp_price_scheme') == "single" && get_option('activate_paypal') == "yes" ) { ?>
    		<?php _e('One ad listing costs','cp'); ?> <?php echo get_option('currency'); ?><?php echo get_option('ad_value'); ?> 
    		<?php _e('for','cp'); ?> <?php echo get_option("prun_period"); ?> <?php _e('days.','cp'); ?>
    		<?php } 
    
    		// if paypal is turned on and category-level pricing
    		elseif ( get_option('cp_price_scheme') == "category" && get_option('activate_paypal') == "yes" ) { ?>
    		<?php _e('Ad listing prices vary based on category. List your item for','cp'); ?> <?php echo get_option("prun_period"); ?> <?php _e('days.','cp'); ?> 
    		<?php } 
    		
    		// if paypal is turned on and category-level pricing
    		elseif ( get_option('cp_price_scheme') == "percentage" && get_option('activate_paypal') == "yes" ) {?>
    		<?php _e('Ad listing price equates to','cp')?>  <?php echo get_option('cp_ad_percent'); ?>% <?php _e('of your item price. List your item for','cp');?> <?php echo get_option("prun_period"); ?> <?php _e('days.','cp'); ?>
    		<?php } ?> 
    
    		</h3>
    
    
    
    		<?php if(get_option('ads_form_note') != "") { ?>
    
    		<?php echo stripslashes(get_option('ads_form_note')) ?>
    		<?php } ?>
    	
    	</div>
    
    
    	<form action="" method="post" enctype="multipart/form-data" id="new_post2" name="new_post2">
    		<input type="hidden" name="action" value="post" />
    		<?php wp_nonce_field( 'new-post' ); ?>
    
    		<div class="left_form">
    
    
    		
    		<label for="cat"><?php _e('Choose a Category','cp'); ?> <span>*</span></label>
    		
    		<?php if ( get_option('cp_price_scheme') == "category" && get_option('activate_paypal') == "yes" ) { ?>
    				<?php cp_dropdown_categories_prices('show_option_none=Select One&orderby=name&order=ASC&hide_empty=0&hierarchical=1'); ?>
    		<?php } else { ?>
    				<?php wp_dropdown_categories('show_option_none=Selecteer categorie&orderby=name&order=ASC&hide_empty=0&hierarchical=1'); ?>
    		<?php } ?>		
    		
    				<label for="title"><?php _e('Title','cp'); ?> <span>*</span></label>
    				<input type="text" id="title" class="adfields" name="post_title" size="60" maxlength="100" value="<?php echo $_POST['post_title'];?>" />
    				
    				<label for="price"><?php _e('Price','cp'); ?> <span>*</span> <?php _e('(do not enter currency symbol)','cp'); ?></label>
    				<input type="text" id="price" class="adfields" name="price" size="60" maxlength="100" value="<?php echo $_POST['price']; ?>" />
    				
    				<label for="location"><?php _e('Location','cp'); ?> <span>*</span></label>
    				<input type="text" id="location" class="adfields" name="location" size="60" maxlength="100" value="<?php echo $_POST['location']; ?>" />
    
    				<label for="description"><?php _e('Description','cp'); ?> <span>*</span></label>
    				<textarea name="description" id="description" class="adfields" rows="10" cols="46" onkeydown="textCounter(document.new_post2.description,document.new_post2.remLen1,5000)"
    				onkeyup="textCounter(document.new_post2.description,document.new_post2.remLen1,5000)"><?php echo $_POST['description']; ?></textarea>
    
    
    				<div class="limit">
    					<input disabled="disabled" readonly="readonly" type="text" name="remLen1" size="4" maxlength="4" value="5000" style="width: 40px;" /><span style="font-size:11px;"> <?php _e('characters left','cp'); ?></span>
    				</div>
    
    
    		</div>
    
    
    <?
    	// call this param so we can prefill the form for registered users
    	global $current_user;
    ?>
    
    		
    		<div class="right_form">
    
    				<label for="name_owner"><?php _e('Name','cp'); ?> <span>*</span></label>
    				<input type="text" id="name_owner" class="adfields" name="name_owner" size="60" maxlength="100" value="<?php if ($current_user->user_firstname != "") { echo $current_user->user_firstname ." ". $current_user->user_lastname; } else { echo $_POST['name_owner']; }?>" />
    
    				<label for="email"><?php _e('Email','cp'); ?> <span>*</span> <?php _e('(will not be displayed)','cp'); ?></label>
    				<input type="text" id="email" class="adfields" name="email" size="60" maxlength="100" value="<?php if ($current_user->user_email != "") { echo $current_user->user_email; } else { echo $_POST['email']; }?>" />		
    				
    				<label for="phone"><?php _e('Phone','cp'); ?> </label>
    				<input type="text" id="phone" class="adfields" name="phone" size="60" maxlength="100" value="<?php echo $_POST['phone']; ?>" />
    				
    				<label for="post_tags"><?php _e('Tags','cp'); ?> <?php _e('(separate with commas)','cp'); ?></label>
    				<input type="text" id="post_tags" class="adfields" name="post_tags" size="60" maxlength="100" value="<?php echo $_POST['post_tags']; ?>" />	
    
    				<label for="post_tags"><?php _e('URL','cp'); ?> <?php _e('(i.e. http://www.mysite.com)','cp'); ?></label>
    				<input type="text" id="cp_adURL" class="adfields" name="cp_adURL" size="60" maxlength="250" value="<?php echo $_POST['cp_adURL']; ?>" />				
    				<label for="post_tags"><?php _e('Add images','cp'); ?> (<?php _e('images must be under 1 MB','cp'); ?>)</label>
    				<input type="file" name="images[]" class="wwIconified" />
    
    
    				
    
    				
    				<?php if(get_option('cp_featured_ad') != "" && get_option('activate_paypal') == "yes" ) : ?>
    				  <div class="extrasbox">
    				    <div style="margin:10px 10px 10px 0;">
    					  <span class="alignleft" style="padding:10px;"><input name="featured_ad" value="1" type="checkbox" <?php if ($_POST['featured_ad'] == '1') { echo "CHECKED";}  ?> /></span>
    					  <?php _e('Featured Listing','cp'); ?> <?php echo get_option('currency'); ?><?php echo get_option('cp_featured_ad'); ?>
    
    					  <?php _e('Your listing will appear highlighted in yellow on the front page and category page.','cp'); ?>
    				    </div>
    				  </div>
    				<?php endif; ?>		
    				
    				
    				
    				
    		</div>		<div style="clear: both;"></div>
    		<center>
    			<div class="captcha">
    				<?php
    				$nr1 = rand("0", "9");
    				$nr2 = rand("0", "9");
    				?>
    				<?php echo $nr1; ?> + <?php echo $nr2; ?> = <input type="text" name="total" style="width: 30px; text-align: center; border: 1px #DF0005 solid; padding: 4px;" maxlength="2" value="" />  
    				<input type="hidden" name="nr1" value="892347<?php echo $nr1; ?>" />
    				<input type="hidden" name="nr2" value="234543<?php echo $nr2; ?>" />
    			</div>
    			<input id="submit" type="submit" value="<?php _e('Submit Ad','cp'); ?>" class="postit" />
    		</center>
    	</form>
    </div> 
    <?php // } //if the form is ok don't display the form anymore ?>
    
    <?php get_footer(); ?>

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search Engine Not working/Images not showing
    By tiffany in forum ClassiPress General Discussion
    Replies: 11
    Last Post: April 29th, 2009, 03:57 PM