Run code when new page is created in MediaWiki - comments

I want every page on my wiki to end with a <comments /> tag. How do I automatically add this tag to the end of every page?
NOTE: comments tag comes from ArticleComments extension.
Do I have to write my own extension? How do I go about this?

You could take a look at something like the Preloader extension or the MultiBoilerplate extension at the mediawiki home page see if it matches what you need

Related

response.xpath not returning value

I am trying to extract the pricing for an item on the following page: https://www.lowesforpros.com/pd/DEWALT-20-Volt-Max-1-2-in-Cordless-Brushless-Drill/1000135807
In the following code nothing is returned:
response.xpath("//*[#id='main']/div[6]/section[1]/div[3]/div[2]/div[2]/div/span[1]/text()").extract()]
I have looked at the source and do not see any indication of JS in use to pull the pricing.
What about simple:
response.xpath('//span[#itemprop="price"]/#content').extract_first()
The price section is not included in the basic HTML of the page. It is loaded by javascript after the completion of page loading. Consequently, the path is not specified anything. You have to use javascript renderer engines such as Splash or web drivers like Selenium

Create a Link To An External Page On Order Confirmation Page in Prestashop

I'm very naive. I am not able to create an external hyperlink on the order confirmation page. (lets say http://google.com)
I've modified the bank transfer module to create a manual payment method, but I am not able to add a simple link on the confirmation page. The screenshot depicts it well.
Also attaching the screenshot of the backend where I input the text. I've tried editing the tpl files, but it doesn't change the actual code on the browser. I have even tried disabling html filter and typing href on the text box itself, again the code just disappears in the browser.
The images will make things very clear.
Thanks.
Link
Backend
The solution is simple, like ébewè said, go to advanced settings > Performances, and clear cache or select no from the drop-down menu next to cache.
Then you can just use high school grade html commands in tpl file to wrap the requisite text inside the code. It works!
Thanks ébewè!

Joomla module or component to be render on a blank page

I have developed a Joomla module that does provides a form, processes its post data, does some calculations and displays the results.
The module includes a button to print the results. I'm currently using JavaScript to open a new window, paste the relevant HTML and open the print dialog.
Instead of JavaScript I would prefer to provide a separate URL for the print view and simply open that in a _blank target. This would make the application work better for people using screen readers or not having JavaScript available.
Is there any way that I can tell Joomla to not render the template along with my module? I was thinking that creating a component fixes that issue, but had to find that components are rendered into the template, too...
BTW: I have Joomla 1.5.22
To achieve what you want you have to add additional tmpl=component query string parameter to the request URL. This will disable template and module rendering.
Your URL will look something like this: index.php?option=com_xxx&view=xxx&tmpl=component
Since you are using Joomla 1.5 you can request index2.php?option=com_xxx&view=xxx and it will only render the component. Joomla 2.5 does not have index2.php so if you plan to migrate in future, don't use this option.
If you are using SEF then adding ?tmpl=component at the end on URL does the trick.
To go a step deeper... in your template directory you have component.php file, that is the file that's being loaded by tmpl param. You can copy component.php to my_component.php, do necessary changes and load your custom component template with index.php?option=com_xxx&view=xxx&tmpl=my_component
The joomla way of doing it would be to set your output to "raw", see this tut:
http://www.katcode.com/displaying-raw-output-in-joomla-by-setting-format-in-the-component/

What to put in HTML snapshot for hash-bang URL for SEO?

I am using hash-bang URLs in my AJAX application and I am implementing the server-side for:
handle ?_escaped_fragment_=key1=value1%26key2=value2
So when I look at Google's FAQ, it says that this URL has an equivalent snapshot
It is easy to see that the snapshot content is not the same as corresponding hash-bang url. This Google example does not help and therefore my question:
My HTML page has three components/panels/sections that are being updated by AJAX. I use the onclick event on the hash-bang URLs to fetch the content from server and then update relevant section of the HTML page. My panels are updated independent of each other and each panel has its own hash-bang URL .
My question is:
Should the HTML snapshot contain the entire page with all 3 sections or only the updated section?
If I am to return the entire page, it is almost impossible to get the state of the other 2 sections correctly, so would the Googlebot reject my site if the other 2 sections are returned in their default state ?
this is a good question, sadly no answer for this one :( im looking for the same. My problem is that EVERYTHING are news loaded with ajax, so each news is actually a little peace of text so im asking myself if my snapshots should be only the current new or a full page with all the info that i have in my home plus current new's content
Do you have news about that topic ?

How can I do a Directory Listing of ebsites with Ez?

I need to do a specific task with Ez Publish but I don't have a clue on how to do it.
What I need to do is a list of Websites(Website directory). I will need to add basically two kinds of data:
Website Name
URL of the website
Then, when I click in the website link it will redirect to a page where I have the IFRAME with the link(URL of the website).
Can someone give me a clue about how to do this with Ez Publish? I'm a beginner.
Best Regards,
You haven't said anything about where you're getting the list from, so I assume you have the list already and just want to know the correct way to input this type of content.
Login to the site admin area, browse to the part of the site you want the list to be at (usually a folder). You'll be adding content items of type 'link' below the folder.
Select the 'Link' content type and click on the 'Create' here button. Enter the content (including the link URL to the page containing the IFRAME) then send for publishing.
I'm assuming the sites are your own, since many sites now take steps to prevent others placing their page in an IFRAME.
If you want this page to not just link to the iframe page, but to actually display the iframe content, then you'll need to override the default link template (copy it and tell eZ to use your version instead) and add a bit of html for the IFRAME.
If you're the main user imputing this content, you could also just allow eZ to accept literal HTML in the main description text areas (XML Block) and just paste in your IFRAME html. Ugly but quick to set-up.
You should be able to find many examples of entering literal html at the community web forums http://share.ez.no/forums
You should create a specific class for that with the two fields you need.
One for the name and another one with the URL.
Then you'll just have to make an override of node/view/full.tpl for your new class Where you will display the name and an iframe with URL that have been typped in your class instance.

Resources