Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 06-30-2009, 02:28 PM   #1
Active Warrior
 
vijay08's Avatar
 
Join Date: Aug 2008
Posts: 39
Thanks: 1
Thanked 1 Time in 1 Post
Default Php Help on my blog.

Hi warriors, I have a self hosted wordpress blog. But while I was pasting some add code to the theme, suddenly the blog could not just load. Each time I type the url to my web browser this is what is always displayed. Parse error: syntax error, unexpected '<' in /home/fataiade/public_html/wp-content/themes/magazine-basic/widgets/widget_feature.php on line 58. Please can some one come to my aid.

Thanks.


Last edited by vijay08; 06-30-2009 at 02:32 PM. Reason: Mistake on the title.
vijay08 is offline   Reply With Quote
Old 06-30-2009, 03:18 PM   #2
HyperActive Warrior
War Room Member
 
pdrw07's Avatar
 
Join Date: Jun 2008
Location: Jakarta
Posts: 279
Blog Entries: 1
Thanks: 50
Thanked 62 Times in 29 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to pdrw07
Default Re: Php Help on my blog.

Hi Vijay, there is error in widget_feature.php, there is unexpected "<" on line 58.
Maybe you could check what you added there? Best way to check is download the file from your host and check it in dreamweaver.

pdrw07 is offline   Reply With Quote
Old 07-04-2009, 02:11 PM   #3
Active Warrior
 
vijay08's Avatar
 
Join Date: Aug 2008
Posts: 39
Thanks: 1
Thanked 1 Time in 1 Post
Default Re: Php Help on my blog.

pdrw07, thanks for your assistance, I have checked and Edith the said file. But there is no changes, though I use front page to check and Edith the file.

Thanks.
vijay08 is offline   Reply With Quote
Old 07-04-2009, 03:53 PM   #4
Active Warrior
 
Join Date: Apr 2009
Posts: 36
Thanks: 0
Thanked 2 Times in 2 Posts
Default Re: Php Help on my blog.

Stick the code on here for us to have a look?
Adi E is offline   Reply With Quote
Old 07-05-2009, 04:24 AM   #5
HyperActive Warrior
War Room Member
 
pdrw07's Avatar
 
Join Date: Jun 2008
Location: Jakarta
Posts: 279
Blog Entries: 1
Thanks: 50
Thanked 62 Times in 29 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to pdrw07
Default Re: Php Help on my blog.

Yes Adi is right, paste the code here so we could look it.

pdrw07 is offline   Reply With Quote
Old 07-05-2009, 03:42 PM   #6
Active Warrior
 
vijay08's Avatar
 
Join Date: Aug 2008
Posts: 39
Thanks: 1
Thanked 1 Time in 1 Post
Default Re: Php Help on my blog.

Thanks you all for your concern. The following is the code you requested.

<?phpfunction widget_sideFeature() { $options = get_option("widget_sideFeature"); $numberOf = $options['number']; $category = $options['category']; $category = "&cat=" . $category; $showposts = "showposts=" . $numberOf . $category ; ?> <?php $featuredPosts = new WP_Query(); $featuredPosts->query($showposts); ?> <?php $i = 1; ?> <?php while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?> <h1 class="side"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1> <div class="meta"> By <?php the_author() ?> </div> <div class="storycontent <?php if($numberOf == $i) { echo "noline"; } $i++; ?>"> <?php theme_excerpt('25'); ?> </div> <?php endwhile; }function widget_myFeature($args) { extract($args); $options = get_option("widget_sideFeature"); echo $before_widget; echo $before_title; echo $options['title']; echo $after_title; widget_sideFeature(); echo $after_widget; }function myFeature_control(){ $options = get_option("widget_sideFeature"); if (!is_array( $options )) { $options = array( 'title' => 'Feature', 'number' => '1', 'category' => '0' ); } if ($_POST['sideFeature-Submit']) { $options['title'] = htmlspecialchars($_POST['sideFeature-WidgetTitle']); $options['number'] = htmlspecialchars($_POST['sideFeature-PostNumber']); if ( $options['number'] > 5) { $options['number'] = 5; } $options['category'] = htmlspecialchars($_POST['sideFeature-Category']); update_option("widget_sideFeature", $options); }?> <p> <label for="sideFeature-WidgetTitle">Title: </label><br /> <input class="widefat" type="text" id="sideFeature-WidgetTitle" name="sideFeature-WidgetTitle" value="<?php echo $options['title'];?>" /> <br /><br /> <label for="sideFeature-PostNumber">Number of posts to show: </label> <input type="text" id="sideFeature-PostNumber" name="sideFeature-PostNumber" style="width: 25px; text-align: center;" maxlength="1" value="<?php echo $options['number'];?>" /><br /> <small><em>(max 5)</em></small> <br /><br /> <label for="sideFeature-Category">From which category: </label> <?php $options = get_option("widget_sideFeature"); $category = $options['category']; ?> <?php wp_dropdown_categories('name=sideFeature-Category&selected='.$category); ?> <input type="hidden" id="sideFeature-Submit" name="sideFeature-Submit" value="1" /> <p><small><em>(Note: The selected will be excluded from the main content on the index page)</em></small></p> </p><?php}register_sidebar_widget( 'Featured Post', 'widget_myFeature');register_widget_control( 'Featured Post', 'myFeature_control');?>
vijay08 is offline   Reply With Quote
Old 07-06-2009, 01:27 PM   #7
Warrior Member
 
Join Date: Jul 2009
Location: Central NJ
Posts: 12
Thanks: 0
Thanked 2 Times in 1 Post
Default Re: Php Help on my blog.

This the code for the widget - where is the code for the ad code you put in? I'm sure that you have either an extra '<' in the ad code or you inserted your ad code in the wrong place.
cdtboxhdr is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
blog, php

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 08:36 PM.