473,659 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parse error: syntax error, unexpected 'id' (T_STRING) in /home/jordanhefler/public_ht

3 New Member
Hi, I am new to building my website and tried to insert a google font code into the php code of my wordpress theme, Touchfolio. I keep getting this parse error notification and I am extremely frustrated. It says there is an error on line 116. Can someone please help me find this error?!?!
This is my code:


Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. add_action('init','of_options');
  4.  
  5. if (!function_exists('of_options')) {
  6. function of_options(){
  7.  
  8. //Access the WordPress Categories via an Array
  9. $of_categories = array();  
  10. $of_categories_obj = get_categories('hide_empty=0');
  11. foreach ($of_categories_obj as $of_cat) {
  12. $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}
  13. $categories_tmp = array_unshift($of_categories, "Select a category:");    
  14.  
  15. //Access the WordPress Pages via an Array
  16. $of_pages = array();
  17. $of_pages_obj = get_pages('sort_column=post_parent,menu_order');    
  18. foreach ($of_pages_obj as $of_page) {
  19. $of_pages[$of_page->ID] = $of_page->post_name; }
  20. $of_pages_tmp = array_unshift($of_pages, "Select a page:");       
  21.  
  22. //Testing 
  23. $of_options_select = array("one","two","three","four","five"); 
  24. $of_options_radio = array("one" => "One","two" => "Two","three" => "Three","four" => "Four","five" => "Five");
  25. $of_options_homepage_blocks = array( 
  26. "disabled" => array (
  27. "placebo"         => "placebo", //REQUIRED!
  28. "block_one"        => "Block One",
  29. "block_two"        => "Block Two",
  30. "block_three"    => "Block Three",
  31. ), 
  32. "enabled" => array (
  33. "placebo" => "placebo", //REQUIRED!
  34. "block_four"    => "Block Four",
  35. ),
  36. );
  37.  
  38.  
  39.  
  40. /*-----------------------------------------------------------------------------------*/
  41. /* TO DO: Add options/functions that use these */
  42. /*-----------------------------------------------------------------------------------*/
  43.  
  44. //More Options
  45. $uploads_arr = wp_upload_dir();
  46. $all_uploads_path = $uploads_arr['path'];
  47. $all_uploads = get_option('of_uploads');
  48. $other_entries = array("Select a number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19");
  49. $body_repeat = array("no-repeat","repeat-x","repeat-y","repeat");
  50. $body_pos = array("top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right");
  51.  
  52. // Image Alignment radio box
  53. $of_options_thumb_align = array("alignleft" => "Left","alignright" => "Right","aligncenter" => "Center"); 
  54.  
  55. // Image Links to Options
  56. $of_options_image_link_to = array("image" => "The Image","post" => "The Post"); 
  57.  
  58.  
  59. /*-----------------------------------------------------------------------------------*/
  60. /* The Options Array */
  61. /*-----------------------------------------------------------------------------------*/
  62.  
  63. // Set the Options Array
  64. global $of_options;
  65. $of_options = array();
  66. $images_url =  ADMIN_DIR . 'images/';
  67.  
  68. /**
  69. General options
  70. */
  71.  
  72. $of_options[] = array( "name" => __("General Settings", 'dsframework'),
  73. "type" => "heading");
  74.  
  75. $of_options[] = array( "name" => __("Logo", 'dsframework'),
  76. "desc" => __("Main logo image. Default size is 97px x 16px. If blank site title text will be used.<br/>Size and position on different screen sizes and pages may be configured in selected skin less css file.", 'dsframework'),
  77. "id" => "main_logo",
  78. "std" => "",
  79. "type" => "media");            
  80.  
  81.  
  82.  
  83.  
  84. $of_options[] = array( "name" => __("Tracking Code", 'dsframework'),
  85. "desc" => __("Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.", 'dsframework'),
  86. "id" => "google_analytics",
  87. "std" => "",
  88. "type" => "textarea"); 
  89.  
  90. $of_options[] = array( "name" => __("Favicon", 'dsframework'),
  91. "desc" => __("16px x 16px ico/png/gif image that will represent your website's favicon.", 'dsframework'),
  92. "id" => "custom_favicon",
  93. "std" => "",
  94. "type" => "upload"); 
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. $of_options[] = array( "name" => __("Footer Text", 'dsframework'),
  103. "desc" => __("Text in footer. Height of footer may be configured in selected skin less css file. Leaving 'Powered by Touchfolio' text is not required, but much appreciated and keeps project alive. ", 'dsframework'),
  104. "id" => "footer_text",
  105. "std" => "Powered by <a href='http://dimsemenov.com/themes/touchfolio/'>Touchfolio</a>.",
  106. "type" => "textarea"); 
  107.  
  108. $of_options[] = array( "name" => __("Google Fonts Code", 'dsframework'),
  109. "desc" => __("Google webfont code (or any other), will be inserted in site header. Example: <code>&lt;link href='http://fonts.googleapis.com/css?family=Crimson+Text:400,600,400italic' rel='stylesheet' type='text/css'&gt;</code>. Get it <a href='http://www.google.com/webfonts'>here</a>. Theme font can be changed in selected skin less css file.", 'dsframework'),
  110. "id" => "google_fonts_code",
  111. "std" => "",
  112. "type" => "textarea"); 
  113.  
  114. $of_options[] = array( "name" => __("Skin File", 'dsframework'),
  115. "desc" => __("Theme skin less file.", 'dsframework'),
  116. "id" => "alt_stylesheet",
  117. "std" => "style-touchfolio-default.less",
  118. "type" => "text"); 
  119.  
  120.  
  121. $of_options[] = array( "name" => __("Facebook admin id", 'dsframework'),
  122. "desc" => __("Facebook admin id. Leave empty if you don't need any tracking of sharing.", 'dsframework'),
  123. "id" => "fb_admin_id",
  124. "std" => "",
  125. "type" => "text"); 
  126.  
  127.  
  128. /**
  129. Gallery options
  130. */
  131. $of_options[] = array( "name" => __("Gallery", 'dsframework'),
  132. "type" => "heading");
  133.  
  134.  
  135. $of_options[] = array( "name" => __("Album categories in gallery page", 'dsframework'),
  136. "desc" => __("Comma separated album categories to be displayed in galleries page template (usually home page). Leave empty to display all.", 'dsframework'),
  137. "id" => "album_cats_gallery_page",
  138. "std" => "",
  139. "type" => "text"); 
  140.  
  141.  
  142. $of_options[] = array( "name" => __("Default Background Color", 'dsframework'),
  143. "desc" => __("Select default album color, you can override it in album settings for specific album.", 'dsframework'),
  144. "id" => "gallery_background",
  145. "std" => "",
  146. "type" => "color");
  147.  
  148. $of_options[] = array( "name" => __("Default Background Pattern", 'dsframework'),
  149. "desc" => __("Enter full URL to default album pattern, you can override it in album settings for specific album. Or leave empty, if you need just color.", 'dsframework'),
  150. "id" => "gallery_background_pattern",
  151. "std" => "",
  152. "type" => "text");
  153.  
  154. $of_options[] = array( "name" => __("Default Image Scale Mode", 'dsframework'),
  155. "desc" => __("Select how images will resize. This is default value, you can override it in album settings.", 'dsframework'),
  156. "id" => "gallery_scale_mode",
  157. "std" => "fit-if-smaller",
  158. "type" => "select",
  159. "options" => array(
  160. 'fit-if-smaller' => __("Fit in area", 'dsframework'),
  161. 'fill' => __("Fill the area", 'dsframework'),
  162. 'none' => __("Don't scale", 'dsframework')
  163. ) );
  164.  
  165. $of_options[] = array( "name" => __("Gallery Image Size", 'dsframework'),
  166. "desc" => __("WordPress image size for gallery images. Can be large, medium, or any other image size type. You'll need to resave all existing galleries if you change this.", 'dsframework'),
  167. "id" => "gallery_image_size",
  168. "std" => "full",
  169. "type" => "text");
  170.  
  171. $of_options[] = array( "name" => __("Auto-open project description", 'dsframework'),
  172. "desc" => __("Automatically open project description on first image of every album."),
  173. "id" => "auto_open_project_desc",
  174. "std" => "1",
  175. "type" => "checkbox");
  176.  
  177.  
  178. }
  179. }
  180. ?>
Feb 26 '14 #1
4 3424
Dormilich
8,658 Recognized Expert Moderator Expert
Can someone please help me find this error?!?!
the line number as indicated by the error message would help.
Feb 27 '14 #2
jhefler
3 New Member
Ah I apologize I thought it was in the title, the line that has the error is line 116
Feb 27 '14 #3
Dormilich
8,658 Recognized Expert Moderator Expert
what does __("Theme skin less file.", 'dsframework') return?
Feb 27 '14 #4
jhefler
3 New Member
I have no idea, all I know is that I used a google font code to replace the font part of the string like it said to and that is when something must have happened to damage it. I reverted everything back to the original code though and it still didn't work.
Mar 12 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6086
by: basswhizz | last post by:
Hi everyone im a high school student and I'm having trouble with one of my projects could you please help!! I'm getting this error message. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in C:\wamp\www\dwalk96\sign-up.php on line 26 Here is all the code of the file. <?php // Connects to your Database mysql_connect("aldridge3", "root", "") or die(mysql_error()); mysql_select_db("dwalk96") or...
10
5651
by: benicio | last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19 I got this error and this syntax is from 8 to 19th line. <?php $subject_set = get_all_subjects(); while ($subject = mysql_fetch_array($subject_set)) { echo "<li>{$subject}</li>"; $page_set = get_pages_for_subject($subject);
13
3785
Topbidder
by: Topbidder | last post by:
I have this error on the code Parse error: syntax error, unexpected '"' in /home/topbidd/public_html/bid2/bid_classic.php on line 159 now i thought the error was this It seems that the code has an extra " at the end before the ; VALUES('" .$auction_id. "','" .$user_id. "','" .converttonum(get_next_bid($auction_id)). "','" .$NOW. "')";
3
2649
by: CYNTHIA CUTRER | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Log</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="title" content="Walker Energy Brokerage" /> <meta name="description" content="National Energy Brokering Firm" /> <meta...
2
3098
by: Vicki Hendra | last post by:
Hi I am new to php fullstop I and colleagues have setup wordpress blogs for our local towns, giving the local businesses free advertisment. Part of the problem started when using wordpress plugins/business-directory. when the form is filled in with the business information, for some reason the description field is not allowing all the details to be present when they are accessed. When accessing wordpress forums, it was noted that I was not...
5
1928
by: Adam Pelling | last post by:
I'm getting this error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/neblncbt/public_html/forum/includes/acp/acp_board.php on line 69 Here is the acp_board.php file <?php /** * * @package acp
6
7593
by: ayas makki | last post by:
when i am trying to install my script it's give me the following error : Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING in C:\wamp\www\ocm\install\index.php on line 313 here is the install file code: <?php session_start(); ob_start(); include('../Includes/class.gzip_encode.php');
1
2408
by: Jeroendutch | last post by:
Helle everyone, I'm am not that familiar with HTML codes etc. but I do have a serious problem with my website witch gives the following code if I open it: Parse error: syntax error, unexpected $end in /home/person69/public_html/templates/game_crusade/index.php on line 359 I've checked the template and looked at line 359 if there whas a problem but I could not solve it (cause I dont understand). This is the code of the template HTML ...
4
2088
by: thiagorisan | last post by:
Hi Guys.. I Heave the problem with my script of BPPennyMultiBid. This is Error: Parse error: syntax error, unexpected '"' in /home/thi8isju/public_html/bid_classic.php on line 159 This is the code: <?
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.