Joomla(2.5) regional content - joomla

Is there joomla component or something else which allow to divide site by user city?(....which work with zoo component)
I want to show different content for each city or to show default content.
Also url change by city:
site.ru/chicago
site.ru/dallas
or
dallas.site.ru
chicago.site.ru
Open site -> choose my city -> and i see all content for my city(pages,products...)

You can use something like this http://extensions.joomla.org/extension/metamod
or use GeoIp libary and solve that programmaticly.

Related

Why Joomla shows contents with any URL?

I found a bug in my Joomla 3.6.4 site when I searched in google for test purpose.
For example I have a content with ID 34 and alias myalias
Now Unexpectedly all of below URLs load my content:
http://example.com/test-test-test/34-myalias
http://example.com/mytest/34-myalias
http://example.com/hellowwwwwwwwwwwww/34-myalias
http://example.com/aything/34-myalias
and so on.
This is not TRUE at all!! The content must be loaded just in my predefined menu item. For example I assign a new Menu Item in Menu Manager like definedmenu witch shows content 34. So below URL should works only:
http://example.com/definedmenu/34-myalias
What is the problem. It's bad for my website SEO...
Thanks.
http://example.com/index.php?option=com_content&view=article&id=34&name=ram&age=30
here
http://example.com/index.php is a base url
and
option=com_content&view=article&id=34&name=ram&age=30
these are input variables
when we change url to SEO url
http://example.com/index.php/content/article/34/ram/30
so
http://example.com/test-test-test/34-myalias
http://example.com/mytest/34-myalias
http://example.com/hellowwwwwwwwwwwww/34-myalias
http://example.com/aything/34-myalias
"test-test-test" treat as input variable
"mytest" treat as input variable
but each component have some restriction in component route, in content "id-alias" format so "34-myalias" but here id is important
http://example.com/test-test-test/34-myaliasdfdfdfd it will work
http://example.com/test-test-test/34-sdsdsdmyalias it will work
but
http://example.com/test-test-test/sdsd34-myalias it will not work
This is why many people turn to SEO components like
RSSEO! https://www.rsjoomla.com/joomla-extensions/joomla-seo.html
or
sh404SEF https://weeblr.com/joomla-seo-analytics-security/sh404sef

How can I preview Virtuemart2 Order verification email layout changes?

I am trying to change the layout ( css/html structure) of Virtuemart 2 order verification emails. Problem is that I have to make a fake purchase each and every time I do a change in the 10 different files (located # components/com_virtuemart/views/invoice/order/tmpl) that create this email template.
The closest "preview" I got was this direct access url "http://domain.com/index.php?option=com_virtuemart&view=invoice&layout=invoice&format=html&tmpl=component&virtuemart_order_id=1401"
But again it loads Joomla's head/body elements not the actual email template.
So how can I have a "preview" of how the template looks like with my new changes BEFORE make an actual test purchase? Is this possible?
You shouldn't change the core files otherwise the next update of VirtueMart (of which there are many) will erase your changes.
You should use Joomla!'s template overrides which VM2 supports that way you can update as needed to new versions without loosing your changes. See this article on docs.joomla.org on "How to override the output from the Joomla! core" and this one on template overrides.
3. You need to add the &format=raw at the end of the link to retrieve just the output of the component with out the template/html body wrapped around it. Of course that relies on the component as well.
I was going to suggest using raw, but looking at the current VM2 it doesn't properly support the format=raw option. Looking at the mail layout in the invoice view it not structured to return it the way you expect, it actually generates a HTML version by default with a matching text only version.
The best I could come up given those two options
Return a close equivalent of the HTML email
http://domain.com/index.php?option=com_virtuemart&view=invoice&layout=mail&virtuemart_order_id=1401&tmpl=component
Return the text version, albeit wrapped in the html page... you may have to view the source to see your invoice text.
http://shop.craigphillips.biz/index.php?option=com_virtuemart&view=invoice&layout=mail_raw&virtuemart_order_id=4&tmpl=component

Open Graph ticker localization

My app adds lines like this to the ticker "[User] read [article] on [app]". I'd like to have that translated into Danish for users that use Facebook in Danish, so I've added this to the meta tags:
<meta property="og:locale" content="da_DK" />
The name of the object is "read", and the action is "article".
Unfortunately, the ticker line isn't shown in Danish, just English. How do I make it do that? I've already read https://developers.facebook.com/docs/internationalization/, but I can't get it to work. Is it possible that the action/object just haven't been translated into Danish by whomever translates Facebook? If so, how do I confirm that?
https://developers.facebook.com/tools/debug returns no error for the page, and the language tag seems to be correctly parsed.
Yeah, this kind of translation is done in the Facebook Translations app.
Go into your app settings, click edit, and on the left there will be a link to "Translate your App" - in this tool, you'll be able to specify the non-English structure of News Feed and Ticker stories.
The object itself (title etc) in Danish will be picked up from your object URL.
Talking about the Translations Admin Panel, tab Browse Phrases, column Status, reachable under:
https://www.facebook.com/translations/admin/dashboard.php?app={APP_ID}&aloc={LOCALE_YOU_TRANSLATE_TO}
What should then be the right value for this column? I have I approved at the moment and translations are not visible in the OpenGraph messages appearing in the Ticker or on the Timeline.

How to show a module in Joomla when it's not a Menu item

I am trying to show a module, but the article I want to show the module on is not linked to a menu item. Is this possible? Seems like a module can only show when it is a menu item. But I have a ton of articles that are not menu items - so what is easiest way to show the module? Any help would be greatly appreciated.
The way to do this is as follows.
Let's suppose you have a group of articles that you wish to all display the same modules on.
Create a new category using the "category manager" option from the content menu
Ensure all the articles are published into this same category.
Create a new menu which you won't actually ever display anywhere (I like to publish the menu into a module position which is not present in the template)
Add a category blog layout option to this new menu
Now go through each of the modules that you wish to display for the group and add them to the new menu item you have created.
Hope this helps!
This will be my first answer after getting so many help through stackoverflow without being a member.
I will just add something to buzzki's answer. Because i was almost loosing my mind until i figure out how to solve.
If you used an article in a module with an extension like mod_articleasmodule; it adds the aliases of articles on URL of Read More.
Simply change the line;
$link = "index.php?option=com_content&view=article&id=".$item->id.":".$item->alias."&catid=".$item->catid.":".$item->catalias;
to
$link = "index.php?option=com_content&view=article&id=".$item->id."&catid=".$item->catid;
to get the pure URL Link and your menu assigned by MetaMod will work. Also great thanks to buzzki for help.
While the {loadposition xxx} technique is very handy, what it won't do is to put the module into any of the "standard" module positions (e.g. left, right, banner, or whatever your template has).
If you want your module in one of those positions, a great method is to use MetaMod. MetaMod is a placeholder module, that includes other modules inside of itself according to rules that you set up.
So you can set it up with a rule that says, in effect, "if we are on article A, B, C, D or E, display the module".
if ($content_genius->check("article_id = 50, 51, 52, 53, 54")) return XXX;
// replace XXX with the module id to show on those articles
Now, if the number of articles is going to change regularly, you don't want to have to edit the MetaMod to change the list of ids. So another way is to use the Meta Keywords field in the articles to determine whether the module will appear. Then all you have to do is include that keyword on any article you want the module to appear on. Let's say the keyword will be "SHOWMOD".
So in MetaMod you can simply use this:
if ($content_genius->check("article_metakeywords contains SHOWMOD")) return XXX;
// replace XXX with the module id to show on those articles
In that way, the module will appear on every article page where the article contains that meta keyword. And the module position can be any position on the page (wherever the MetaMod is assigned).
Step 1: On the front end of your website, click to the specific article that you want, highlight and copy the URL.
Step 2: Create a menu item, item type is URL and paste your article URL in there. (You can have the menu item be in an unpublished menu i think)
Step 3: Select it from the Menu Items list in the module.
You simply name your module position whatever you want, say 'monkey' where your module offers a 'select position'. You actually type it in. Then in the article you want to place it in, you add
{loadposition monkey}
to any location of your article you want the mod to work in the html editor.
Follow these steps in your joomla site Admin panel:
Go to the module manager, open the desired module and give a unique name in the position field. If you want to use it also at other common position such as left or right, then first create a copy of this module and then for the new copy, create a unique position name. Example: custom1.
Create a new article preferably uncategorized. Give it the name of your module.
In the body area of the article type {loadposition custom1} and save your article.
Create a Menu link to this article in the desired menu. You should select 'Article layout.'
Thats all, your module will now load from the menu link directly.
This has an added advantage of giving you SEO prominance based on the meta info you give for this article.

Magento - adding a new field to the product options in admin

I'd like to add a new tab to the 'catalog->manage products->product information' page in the admin. Underneath the 'images' tab, I'd like to add a new tab for video, with a simple text input for adding a video url, which I can then grab for the frontend.
Anyone any ideas where the files are that I need to edit? I've been looking for the last couple hours with no joy. I found the list of current options in Mage_Catalog_Model_Resource_Eav_Mysql4_Setup but can't figure out how to add to them...
Seems it gets some from Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs. If I copy one of the tab sections here and change the title to Video, I can get it to display in the tabs on the left. But how do I then add the options for it?
What you are trying to do, from the sounds of it, is to create a custom field and add it to your catalog data. The good news is that you don't need to muck around in the PHP for that.
Head to Catalog -> Attributes -> Manage Attributes and create a new attribute for yourself called "Video URL" (or something to that effect). This will probably be a text field, and you may want to hide it from comparison on the frontend of the site (select "No" for all those boxes at the bottom of the form).
Once you've created an attribute, you will need to add it to an attribute set. If all your products are of one "type", and if you didn't create any other attribute sets, this should be only one step. Head to Catalog -> Attributes -> Manage Attribute Sets and create a "New Group" called "Video" and drag your new video url attribute into it. Save the attribute set and you should now have your new tab.
The only complication from what I read in your post could be positioning it underneath the images tab. Magento adds several tabs statically (the long way, in the PHP) and doesn't generally obey ordering of the tab groups. Consider the time tradeoff.
Hope that helps. Thanks,
Joe
Per your other comments, for the URLs a simple attribute would work but files would tend to be more difficult. To add a custom tab, as you said, you can edit (or in the case of a plugin, override) Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs::_prepareLayout and add your tab. You'll need to add a block or template to display your tab contents.
After that, you'll need to store the data somewhere. Looking in Adminhtml/controllers/ProductController, you should be able to hook into the catalog_product_prepare_save event to get data from $event->getRequest() and push it onto the product or save another entity as necessary.
I'm not sure how well file saving semantics would work on a product, so you may want to do your own data storage in the extension and then provide something like a getVideoForProduct method to retrieve it.
Then the only thing left to do is modify the catalog/product/view.phtml template file to include your thumbs and create a controller in your extension to provide a modal w/ the video (or do it in JS).
I know that's a bit of a general answer, but it's the rough path you would need to take for tabs. Let me know if any specific part of that is unclear.
Thanks,
Joe

Resources