Add javascript to only one theme/layout not the whole site - magento

Please believe me I have tried to search and I only get more and more confused.
I have in the past changed the default prototype reference to my Magento site for a particular theme/layout so that when I am in that particular theme/layout my prototype file is version 1.72 instead of ( i think 1.6) - I can see these changes in the source when I switch between them.
Now I need to add another set of js to the same theme/layout ( only) but I just can't find it anymore where I changed this for that theme.
My theme is defualt/default ( main) and my custom theme is defualt/vod
I thought I was in luck when I found head.phtml in the vod folder but this was only for layouts that I am not using, I want the layout empty... I am so confused and no money to pay people.
Hope you can help

Use local.xml file (app/design/frontend/defualt/vod /layout/local.xml).

Related

Joomla cannot unset mod_languages/css/template.css

Joomla 3.x
The following code is not working
unset($doc->_styleSheets[JURI::root(true).'/media/mod_languages/css/template.css']);
thank you
The code is correct and I tested it, it's working fine.
Possibly you are running it in a plugin event after the head is rendered, or you have cached the page and the code is not really running.
In either case, try to put it at the component level, clear cache, and it should work
Update
to identify the component: turn SEF off, and look at the URL it shows as option=com_componentname;
to identify the module, simply rename the modules folder, and update the site; if it works, it's a module.
For plugins, rename the plugins/system and plugins/content first, then drill down until you spot it.
Alternatively, but much slower, you can turn modules and plugins on and off from the backend, until you find the culprit.
A variation which I've used with success in the past:
unset($doc->_styleSheets[$this->baseurl.'/media/mod_languages/css/template.css']);
Update
Here's an alternate method using a module override which should work for you.
if it doesn't already exist, create a new directory titled html in your template's folder, ie: /templates/your-template/html/
inside this, create an new mod_languages folder, ie /templates/your-template/html/mod_languages/
copy the file from joomla-site-root/modules/mod_languages/tmp/default.php to the folder above, ie /templates/your-template/html/mod_languages/default.php
open this file with a text editor and around line 12 look for the line where JHtml is loading the mod_languages CSS, and comment it out.
// JHtml::_('stylesheet', 'mod_languages/template.css', array(), true);
That's it, hopefully, this will do the trick for you.
Overriding Joomla core output using this method is safe and you won't loose your work with future Joomla updates.
More info about Joomla overrides:
https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Good luck!

Fishpig's Magento WP Integration -- WP not using Magento Theme/Package

I've successfully installed Fishpig's Magento WordPress Integration extension. I followed the instructions where you install via Magento Connect and had no problems. This is by the way all on the development server which does not have Caching or Compiling enabled.
The Magento cart is installed in the webroot directory and WordPress is in subdirectory "wp" as stated in Fishpig's instructions. The Full Integration blog path is /blog.
PROBLEM:
When I visit the blog's page it is not using the Magento theme. I even set it to use the same layout (same as CMS's homepage) We have a custom Magento theme. Maybe there is something we are doing incorrectly Magento theme wise for Fishpig's extension not to work. Screenshots to come eventually but the host (DataGram) is down due to the flooding Downtown. Should be back hopefully today.
To clarify... WordPress is using its own database. In the Shop's admin panel->WordPress tab I setup Full Integration and set the path to "wp" and the blog path is blog.
So, now if I visit for example... example.com you are in the shop and if you visit example.com/blog you are in the fully integrated blog.
Bottom line is it seems to be configured fine in the admin panel. I am not requesting the blog page from the wp directory (I.E: example.com/wp) but from the fully integrated page (example.com/blog).
Our problem could be similar to what this person is experiencing:
Magento - FishPig Integration - Not getting correct template for /blog
Have a great weekend all!
Best Regards,
George
Huzzah looks like I got things working :-)
The culprit was that this file:
"app/design/frontend/default/eboost/layout/wordpress.xml"
^^ was pointing to the wrong template filename. Corrected and was good to go. Modified line was number 66.
Funny thing is that on the top of that XML file it states:
"
Option 1 - local.xml (recommended)
Create a file named local.xml in your custom theme's layout folder. You can then make changes to the layout there by
using the relevant layout handle. This allows you to leave this file intact and recieve new features
when upgrading the extension.
Option 2 - copy this file
Copy this file and it's contents to a new file in your custom theme's layout folder named wordpress.xml.
Each time you upgrade, you will need to check with your copy of the file and
the copy in app/design/frontend/base/default/layout/wordpress.xml for changes and merge any you find"
Now, as stated in my Original Posting I installed FishPig extension using their instructions: http://fishpig.co.uk/wordpress-integration/docs/installation-and-configuration.html
^^ Therefore I don't know why it is setup using Option 2. That wordpress.xml is in our theme's layout directory.
.
.
.
I feel I should also state the other changes I did even though it doesn't seem like it contributed to making it work. Just doing for completeness:
-- Renamed the subdirectory /wp to /wordpress and changed all references to dev.eboost.com/wp to dev.eboost.com/wordpress within the DataBase using http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
-- Removed .htaccess from /wordpress folder
So bottom line is looks like it is working normally. We are now set for working on redesign for site.
--George
Have a look at this.
http://www.wellicious.com/gbren/wellblog
I also used Fishpig and it is working.
What do you mean by visiting the blog page? Do you request the blog page from the wordpress directory?
If so, it doesn't change its design.
You have to request the blog within your shop.

JOOMLA, Best way to make alternate layouts for articles?

I can't find a answer for this, I want to know what is the best way to have an alternative layouts for articles in Joomla.
If I understand you correctly you are looking for a way to create additional Alternative Layouts for articles. Under parameter tab "Article Options":
If that is the case, its very close to the other provided answers here. Its just that you got to rename the copied default.php file to something else. If you rename it to custom.php it will end up with the text "custom" like the image above.
Here goes my shot for a step by step:
Find the default layout file(s). You could use the ones provided by the com_content component. They can be found at components/com_content/views/article/tmpl. Copy both default.php and default_links.php.
Now you need to rename and copy the file(s) into a template. The target template can be any of the installed templates. Using beez_20 the new path for the copied file(s) should be templates/beez_20/html/com_content/article/custom.php and templates/beez_20/html/com_content/article/custom_links.php.
Goto to edit article using the backend. Expand the Article Options tab and find Alternative Layout. Select your new layout.
Your template might already provide a article override. If so, you might want to use the files of that template instead (instead of the ones in step 1). So if you are using beez_20, you could copy templates/beez_20/html/com_content/article/default.php and templates/beez_20/html/com_content/article/default_links.php.
Helpful links:
Using Joomla’s Template and Layout Override
Layout overrides in Joomla 1.6
The best way to do this would either to install another content component - such as k2 which is highly customizable. Or any other content component on JED.
Alternatively you could create a template override on the existing Joomla Template. This is preferable to editing the files directly in com_content component as the template overrides will never be overwritten whereas the core files will be in any Joomla Updates. I should add, hopefully unnecessarily that this requires Joomla 1.5, 1.6, 1.7, 2.5 or 3.0 (although this is still in beta as of present). So make sure you're not using 1.0.
To create an alternative layout for the built in articles component the best way to do it is probably to create a template over-ride.
See this article on docs.joomla.org on "How to override the output from the Joomla! core"
Creating an alternative for an article layout is pretty straight forward. You can achieve this by using the core layout override with your published template(s).
First you want to get/copy the core article layout file:
components/com_content/views/article/tmpl/default.php
Then place it into your published template:
templates/YOURTEMPLATE/html/com_content/article/default.php
If the template you are using doesn't have the html folder, then you will have to create that folder and each folder to make that path correct.
Once you have this in place, all you need to do is make changes to that default.php file you have just place in the template and that is it!

Remove a magento theme - Rollback to default

This is my first time working with Magento and here is what happend: I spent two days reading the documentation and tweaking the settings to fit my needs. I then installed this theme:
http://themeforest.net/item/decostore-magento-theme/1876494?WT.ac=category_thumb&WT.seg_1=category_thumb&WT.z_author=8theme
The problem is that the theme didn't work the way I was expecting and now I'd like to rollback to the default theme and completely remove everything added by this theme to my installation.
Unfortunately, I didn't backup the installation and database before I installed the new theme and I have no idea where to start.
Thanks in advance.
1. Switching back to default theme
Go to the admin area and then system > configuration > design
Change "Current Package Name" to 'default' and make sure all inputs under the "Themes" section are empty. This will return you to the default theme.
2. Completely remove everything added by this theme
I take it from your question that you are not using any form of source control. Might be an idea to look into this for the future :)
Magento 1.7 has introduced backup and rollback features so you may also want to check that out.
If this is the case, backup everything before you start removing files and directories as described below
Anyway, to completely remove all files and directories added when you installed the module, unfortunately it will simply be a case of manually finding the files and directories deleting.
The easiest way to do this will be to find the original source code you received when you purchased the theme and removing the corresponding files from your site. When removing directories be careful to only remove those specific to the theme - It will have been sent to you structured so that you can easily drag straight in to your web root - so will contain some other directories required by Magento, simply to give it the correct hierarchy.
At the very least there will be files and folders specific to the theme located in the following directories:
app/design/frontend
skin/frontend
js
and also most likely some more in the following:
app/etc/modules
app/design/adminhtml
app/locale
I know the result for this can be different for everyone, but in case someone else comes across my specific case, it was the N98 folder under app/code/community/N98 that caused the problem. Particularly their CustomerGroupCheckout plugin as shown here: https://github.com/amenk/N98_CustomerGroupCheckout
Removing the N98 folder brought back the configuration page.

how to change template in phpbb3 forum

i want to change default template in phpbb3. for this where i have to made changes. i am trying to changes file inside style/subsilver2/template...but i didn't made any right .please help me ..in which file i have to made changes.i have also try in admin section in style..but not successes... if any one have clue..please help me.
Thanks
Manish
It depends what part of the page you would like to change, since the template is a set of many HTML files with preprocessing instructions. They are located in:
[PHPBB_Folder]/styles/[Theme_Name]/template
You can find the right html file by searching for a specific part of source code copied from the live page of the forum.
Important note: when you're changing phpBB template files, don't forget to reset the template cache in the forum admin panel (go to Admin / Styles tab - and clear cache for what you changed, Template, Theme, or Imageset.
I hope this helps.

Resources