473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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 3414
Dormilich
8,658 Expert Mod 8TB
Can someone please help me find this error?!?!
the line number as indicated by the error message would help.
Feb 27 '14 #2
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 Expert Mod 8TB
what does __("Theme skin less file.", 'dsframework') return?
Feb 27 '14 #4
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
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...
10
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 ...
13
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...
3
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> ...
2
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...
5
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...
6
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...
1
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...
4
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.