<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Replace superfish script by a customscript</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 20 Jun 2013 06:09:41 +0000</pubDate>

<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27156</link>
<pubDate>Sat, 26 May 2012 18:12:47 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27156@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I finally get it work using this code:&#60;/p&#62;
&#60;blockquote&#62;
&#60;p&#62;// IT WORKS !&#60;/p&#62;
&#60;p&#62;function re_init_jQuery() {&#60;br /&#62;
	if (!is_admin()) {&#60;br /&#62;
		wp_deregister_script('jquery');&#60;br /&#62;
	wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, '1.7.1');&#60;br /&#62;
		wp_enqueue_script('jquery');&#60;br /&#62;
	}&#60;br /&#62;
}&#60;br /&#62;
add_action('init', 're_init_jQuery');&#60;/p&#62;
&#60;p&#62;function childtheme_script_manager() {&#60;br /&#62;
    wp_enqueue_script('silder_01.js', get_bloginfo('stylesheet_directory') . '/script/slider_01.js', array('jquery'), '1.7.1', false);&#60;br /&#62;
} &#60;/p&#62;
&#60;p&#62;add_action('wp_enqueue_scripts', 'childtheme_script_manager');
&#60;/p&#62;&#60;/blockquote&#62;</description>
</item>
<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27143</link>
<pubDate>Fri, 25 May 2012 21:44:28 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27143@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Yeah i read many topic about childtheme creation but simply copy the arborecense of the parent into the child to edit it. At the moment it seems to be the faster way but now, i admit it, it complicate everything.^^&#60;/p&#62;
&#60;p&#62;Tomorrow i will start a new child theme from the begining to keep a clean arborecense with only the things i've created. &#60;/p&#62;
&#60;p&#62;Anyways thanks helga, you post many helpfull things on this forum :]
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27141</link>
<pubDate>Fri, 25 May 2012 21:02:12 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">27141@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;have you done any reading on how to create a proper child theme?  all functions go in your child theme's functions.php&#60;/p&#62;
&#60;p&#62;there's a sample child theme that comes in the thematic folder.  you can copy the folder directly into wp-content/themes, activate it and start from that.&#60;/p&#62;
&#60;p&#62;please don't edit header-extensions.php&#60;/p&#62;
&#60;p&#62;if you are confused wp_enqueue_script then please read the codex page&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;that final &#34;true&#34; means you wish to load it in the footer, which is a good place for many scripts.... it can help pages load faster to put scripts in the footer.
&#60;/p&#62;</description>
</item>
<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27139</link>
<pubDate>Fri, 25 May 2012 20:26:13 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27139@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Well.. I remove the &#34;false, true&#34; part at the end of the code and now the script is correctly loaded into my &#38;lt;head&#38;gt;.&#60;/p&#62;
&#60;p&#62;Script dont work but i suppose that's cause i wanted to modify a css parameter and this parameter is located into a default.css call by the style.css. The script must don't find it... (or it's this &#34;?ver=3.3.2&#34; problem.) I will search further on those directions.
&#60;/p&#62;</description>
</item>
<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27138</link>
<pubDate>Fri, 25 May 2012 18:34:57 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27138@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;With some more search on the forum i finally figure out wht's wrong.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
function childtheme_script_manager() {&#60;/p&#62;
&#60;p&#62;    wp_enqueue_script('silder_01.js', get_stylesheet_directory_uri() . '/library/scripts/slider_01.js', array('jquery'), false, true);&#60;/p&#62;
&#60;p&#62;}&#60;br /&#62;
add_action('wp_enqueue_scripts', 'childtheme_script_manager');&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;With the &#34;.js&#34; in the name of the script and with a path comming from my childtheme directory the script seems to be loaded (even if he dont seems to work^^ He is detected as v3.3.2 script when jquery is at 1.7.1...) But thats a first step...&#60;/p&#62;
&#60;p&#62;Thank you ; )&#60;/p&#62;
&#60;p&#62;edit:&#60;br /&#62;
When i look to my html code the version dont seems to be the only problem. The sript is loaded but just after the wpadminbar script in the bottom of my &#38;lt;body&#38;gt; when it should appears into my &#38;lt;head&#38;gt;.
&#60;/p&#62;</description>
</item>
<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27137</link>
<pubDate>Fri, 25 May 2012 18:25:52 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27137@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ok, it seems that i can declare the thematic_script_manager() function anywhere in the header-extension.php or function.php. (cause my function.php call header-extension.php...)&#60;/p&#62;
&#60;p&#62;So i must be wrong with the script path or with the function name.&#60;/p&#62;
&#60;p&#62;But i test the two names: thematic_script_manager() and childtheme_script_manager().&#60;br /&#62;
And i test different path... even this one: &#34;http://mywebsite.com/wp-content/themes/otomatic/library/scripts/slider_01.js&#34; who must be correct.&#60;br /&#62;
And i never see my script appears in firebug... :s
&#60;/p&#62;</description>
</item>
<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27136</link>
<pubDate>Fri, 25 May 2012 16:55:12 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27136@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Sorry but i'm a pure noob in php/wordpress scripting so:&#60;/p&#62;
&#60;p&#62;where do i add the:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
add_filter('thematic_use_superfish','__return_false');&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;? &#60;/p&#62;
&#60;p&#62;where di i add the:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
function childtheme_script_manager() {&#60;/p&#62;
&#60;p&#62;    wp_enqueue_script('fitvids-js', get_stylesheet_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), false, true);&#60;/p&#62;
&#60;p&#62;}&#60;br /&#62;
add_action('wp_enqueue_scripts', 'childtheme_script_manager');&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;And in the case of a thematic framework do i replace all the:&#34;childtheme_script_manager()&#34; by &#34;thematic_script_manager()&#34; ?&#60;/p&#62;
&#60;p&#62;So if my new script is located in /library/scripts/slider_01.js my function look like this?&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
function thematic_script_manager() {&#60;/p&#62;
&#60;p&#62;    wp_enqueue_script('silder_01', get_stylesheet_directory_uri() . '/library/scripts/slider_01.js', array('jquery'), false, true);&#60;/p&#62;
&#60;p&#62;}&#60;br /&#62;
add_action('wp_enqueue_scripts', 'thematic_script_manager');&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Sorry if i ask too much question when awnser are all in the codex but i'm still doing the layout of my web page for now. So i'm ok with CSS, i'm ok with Jquery luanguage, but i didnt try for now to call any database and learn php. And the thematic php architecture is still a little blurry for me...&#60;br /&#62;
I just need a little help to finish my layout before i get to the php learning.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27135</link>
<pubDate>Fri, 25 May 2012 16:25:37 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">27135@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;to remove all the superfish scripts you can do any of the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_override_head_scripts(){
  //sound of one hand clapping
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;or&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function kia_filter_scripts(){
  //sound of one hand clapping (or return FALSE; would also work)
}
add_filter(&#38;#39;thematic_header_scripts&#38;#39;,&#38;#39;kia_filter_scripts&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;or&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function kia_remove_scripts(){
  remove_action(&#38;#39;wp_head&#38;#39;,&#38;#39;thematic_header_scripts&#38;#39;);
}
add_action(&#38;#39;init&#38;#39;,&#38;#39;kia_remove_scripts&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;or perhaps the most elegant:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;thematic_use_superfish&#38;#39;,&#38;#39;__return_false&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;thematic 1.0 (which officially IS in the review queue right this moment) will properly enqueue scripts in the style suggested by jagst3r15.&#60;/p&#62;
&#60;p&#62;nb: no need to register and then enqueue in his example:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_script_manager() {

    wp_enqueue_script(&#38;#39;fitvids-js&#38;#39;, get_stylesheet_directory_uri() . &#38;#39;/js/jquery.fitvids.js&#38;#39;, array(&#38;#39;jquery&#38;#39;), false, true);

}
add_action(&#38;#39;wp_enqueue_scripts&#38;#39;, &#38;#39;childtheme_script_manager&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;will work just fine.
&#60;/p&#62;</description>
</item>
<item>
<title>Jagst3r15 on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27134</link>
<pubDate>Fri, 25 May 2012 16:12:51 +0000</pubDate>
<dc:creator>Jagst3r15</dc:creator>
<guid isPermaLink="false">27134@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;That is the wrong way to do it. You want to use something like this, using the wp_enque_script method (using fitvids as an example):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_script_manager() {

    wp_register_script(&#38;#39;fitvids-js&#38;#39;, get_stylesheet_directory_uri() . &#38;#39;/js/jquery.fitvids.js&#38;#39;, array(&#38;#39;jquery&#38;#39;), false, true);

    // enqueue the scripts for use in theme
    wp_enqueue_script (&#38;#39;fitvids-js&#38;#39;);
}
add_action(&#38;#39;wp_enqueue_scripts&#38;#39;, &#38;#39;childtheme_script_manager&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;reference: &#60;a href=&#34;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/wp_enqueue_script&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>guivag on "Replace superfish script by a customscript"</title>
<link>http://themeshaper.com/forums/topic/replace-superfish-script-by-a-customscript#post-27133</link>
<pubDate>Fri, 25 May 2012 14:57:37 +0000</pubDate>
<dc:creator>guivag</dc:creator>
<guid isPermaLink="false">27133@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi !&#60;/p&#62;
&#60;p&#62;I wanted to add some custom script into the &#38;lt;head&#38;gt; of my page.&#60;br /&#62;
So i search where the superfish script is called and found it define by a php function into the header-extensions.php.&#60;/p&#62;
&#60;p&#62;I didnt care about the superfish script so i say to myself: &#34;i just have to replace it by my script at the same place and it should work...&#34;&#60;/p&#62;
&#60;p&#62;I removed all the superfish loading part of the code (located after: &#34;// Load scripts for the jquery Superfish plugin &#60;a href=&#34;http://users.tpg.com.au/j_birch/plugins/superfish/#examples&#34; rel=&#34;nofollow&#34;&#62;http://users.tpg.com.au/j_birch/plugins/superfish/#examples&#60;/a&#62;&#34;) and paste this instead:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
function thematic_head_scripts() {&#60;br /&#62;
    $scriptdir_start = &#34;\t&#34;;&#60;br /&#62;
    $scriptdir_start .= '&#38;lt;script type=&#34;text/javascript&#34; src=&#34;';&#60;br /&#62;
    $scriptdir_start .= get_bloginfo('template_directory');&#60;br /&#62;
    $scriptdir_start .= '/library/scripts/';&#60;/p&#62;
&#60;p&#62;    $scriptdir_end = '&#34;&#38;gt;&#38;lt;/script&#38;gt;';&#60;/p&#62;
&#60;p&#62;    //$scripts = &#34;\n&#34;;&#60;br /&#62;
    $scripts .= $scriptdir_start . 'my_script_01.js' . $scriptdir_end . &#34;\n&#34;;&#60;/p&#62;
&#60;p&#62;    // Print scripts&#60;br /&#62;
    print $scripts;&#60;br /&#62;
}&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;But my script dont seems to be loaded...&#60;br /&#62;
What did i do wrong ?&#60;/p&#62;
&#60;p&#62;Thanks for your supplies...
&#60;/p&#62;</description>
</item>

</channel>
</rss>
