How can I create a template in MediaWiki that will autopopulate a portion of itself? - mediawiki

Basically what I'd like to do is to create a template which when embedded in a wiki page will automatically fill in one part of with the title of the page that you are currently reading.
As an example, if you are reading a page titled ExchangeServer. There would be a template included in that page which would include a URL to link to a service.
Part of that URL includes the name of that wiki page. So I would want it to be something along the lines of:
https://AutoPopulatedName:1311
Is there a way to do this? If so, can somebody please explain how?
Thanks in advance!

Are you looking for the {{PAGENAME}} magic word?

Related

Link to current page html

Have been searching some topics but don't think I have found the exact answer I was looking for hence I try here. In my Wordpress website I have a hardcoded button on around 150 pages on each top of a page. I would like to link to an angor text /#anchor halfway of each of this pages.
Now I don't want to enter every specific URL manually. Is there a HTML trick where you refer to the current URL, something in the order of: .com/currentpage/#anchor?
Thanks in advance for any help or tips.
You can add a link on current page without add a page url.
For hash
Link
For QueryString
Link

How to add url to index.html

I am a total newbiew so please forgive me if this looks like a stupid question.
I have a simple HTML page that I want to show with a custom URL.
Currently I have only one site www.mysite.com and that URL is showing on Google and in the addressbar of my browser. But how can I make that when someone goes to my site that it looks like www.mysite.com/my-keyword
So basically what I want to do is to show my site with a fixed URL that have the keyword in it: www.mysite.com/my-keyword
Do I need to make a extra page? My initial thought was to make one Index.html with a http-redirect to my second page, so Index.html + my-keyword.html or is there a simpler way?
I want to achieve this because for Google search results.
Edit: I am using HTML only. But I could use PHP or JavaScript too if someone has a solution for that.
You should read a little bit about URL's. The thing you call a "keyword" is refered to as "path".
It's possible to use a meta tag in the <head>section and redirect the user to another location like this:
<META http-equiv="refresh" content="0;URL=http://www.example.com/page2">
You could also change the value of the adress bar with JavaScript, but that's probably not what you want.
You might want to restate your question with more details about what it is you are trying to do.

Linking to iframe pages

Is possible to link on sub page that is in iFrame?
So basically:
On www.domain.com/page I have just normal HTML page. And on that page I have iFrame where I get the content from www.anotherdomain.com.
Now on anotherdomain.com I have several subpages likes this:
www.anotherdomain.com/spage1
www.anotherdomain.com/spage2
etc.
Now the question is that is it possible to somehow link to one of these frames so that when user uses this link, it would go on one of these subpages. For example like this:
www.domain.com/page#spage2
so that then the www.domain.com/page would show on iframe the content from the page www.anotherdomain.com/spage1
If I have understood correctly, this is not possible but I just need some confirmation on this :)
Sorry for bad explanation. Ask more info if you didn't understand what Im trying to explain.
If I understand what you are asking for correctly:
When a visitor goes to domain.com/page#spage2 you want them to see a url of: www.domain.com/page with the content of anotherdomain.com/spage2
If this is correct, I don't think you can do this with just HTML. You would need either regex in a .htaccess file or with PHP taking advantage of the $_SERVER["PHP_SELF"] call.

How can I format an html page so that when a link is added to G , it looks nice?

Im building a new website, and I was testing the ability to add a "link" to google plus and have the article and it's content (summary) get pulled into google+.
When I do this today, all I see is an image - and no text. I'm sure that there is some formatting change I can make to the page to make the text come in... But I don't know what to do.
If there is a guide somewhere I would like to read it, but I cannot find one. Thanks for the help
An example page:
http://alexedison.com/index.php?indexNum=8
The easiest way is to create snippet data for your page. Google provides a tool for doing this as well as additional information at:
https://developers.google.com/+/web/snippet
You can validate the data on your page using the Google structured data testing tool:
https://www.google.com/webmasters/tools/richsnippets
There is no problem in your webpage.
Google Plus has change the look of each post.
now it shows only Image, Title along with given URL.
if you visit Google Plus , you can see posts without description meta information.

Jsoup - Trying to extract Comments number from web page

I'm trying to extract the overall comments number from a web page using Jsoup.
For example, here is a page (CNN): http://edition.cnn.com/2011/POLITICS/07/31/debt.talks/index.html?hpt=T1
I see that the class ID is cnn_strycmtsndff, but can't get to find the right command to extract it.
Can someone help?
Thanks
Unfortunately, I don't think Jsoup is going to cut it. If you use the Chrome developer tools you can clearly pick out the HTML used for presenting the "(##### Comments)" section, but if you just view the source, none of that information is there. It seems like they are using some Javascript to dynamically embed the information in the page.
This is what you see in "View Source":
<div id="disqus_thread"></div><script type="text/javascript" src="http://cnn.disqus.com/embed.js"></script>
So Jsoup will never be able to see the elements with the comment information.