Forum rules
Zetaboards General Support Rules




Please Note: This is a ZetaBoards support forum





[big]
Before Asking for Support?

[/big]
  • Use the

    Search

    feature.

  • Read the documentation.

    It contains answers to the majority of problems you will encounter.
  • Use a descriptive topic title.
    The quickest way to get your question answered is to be descriptive about your problem. (Not "Help" or "Problem".)
  • Do not bump your topic unless 24 hours have passed.
    If you bump your topic, it will be closed.
  • Do not post your topic in more than one section.
    This will lead to confusion for both yourself and those trying to help.
  • This is not the place to
    discuss server problems
    . Posting about a server problem will not contribute toward fixing the problem and prevents other users from receiving support for their issues. Topics will be closed.
  • Do not PM staff for support.
    You may use this board or the support ticket system. If you continually PM staff for support, you will lose the ability to use the PM system.
[big]
Before Giving Support?

[/big]
  • Know what you are talking about!
    Poor support helps no one. If you do not know the answer to a question, do not post or users may report your post. (You'll get in trouble.)
  • Do not ask for Admin CP access.
    If a problem can only be solved by accessing the Admin CP, tell the user to send in a support ticket.
  • If a topic or user is breaking the rules,
    report it
    using the
    button. Backseat Moderation will not be tolerated. Poor Support will not be tolerated. Report any posts that fit these categories.

All
Board Rules
still apply.
This includes the signature size guidelines.

HTML - Shortened URL?

Cherokee
Cherokee
Joined
Feb 18, 2010
Last active
Jun 07, 2013
Location
Cardiff, Wales
9
Member
9

Apr 14, 2013#1

I have a Web-page associated with my board but, unfortunately, it became too large to be hosted using "Website Maker" in the ZetaBoards ACP during a recent edit and update.

Part of the problem with the edited web-page being larger is that it contains over five-hundred Links to various Wiki Pages. So the term

Code: Select all

<a href=" http://en.wikipedia.org/wiki/xxxxxx
appears that many times in the page (with different targets in the xxxxxx location.

Code: Select all

<TR><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/England">England</a></TD><TD>26</TD><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Netherlands">Netherlands</a></TD><TD>19 </TD><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Vatican_City"> Vatican City </a></TD><TD Class="trb">138</TD></TR>
<TR><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Equatorial_Guinea">Equatorial Guinea</a></TD><TD>199</TD><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Netherlands_Antilles">Netherlands Antilles</a></TD><TD>7</TD><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Venezuela">Venezuela</a></TD><TD Class="trb">5</TD></TR>
<TR><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Eritrea">Eritrea</a></TD><TD>333 </TD><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/New_Caledonia">New Caledonia</a></TD><TD>172</TD><TD Class="tlb"><a href="http://en.wikipedia.org/wiki/Vietnam">Vietnam</a></TD><TD Class="trbr">242</TD></TR>
Is there any way I can insert a Script to Shorten the repeated part of the URL in my Page, without running a "Google.goo" or "TinyURL" for each of the 500+ targets?

It SEEMS to me that I should be able to create a Script in the Board Template somewhere that would do something likeSo that my Web page could be shortened to

Code: Select all

<TR><TD Class="tlb"><a href=$urlA+”England">England</a></TD><TD>26</TD><TD Class="tlb"><a href=$urlA+”Netherlands">Netherlands</a></TD><TD>19 </TD><TD Class="tlb"><a href=$urlA+”Vatican_City"> Vatican City </a></TD><TD Class="trb">138</TD></TR>
<TR><TD Class="tlb"><a href=$urlA+”Equatorial_Guinea">Equatorial Guinea</a></TD><TD>199</TD><TD Class="tlb"><a href=$urlA+”Netherlands_Antilles">Netherlands Antilles</a></TD><TD>7</TD><TD Class="tlb"><a href=$urlA+”Venezuela">Venezuela</a></TD><TD Class="trb">5</TD></TR>
<TR><TD Class="tlb"><a href=$urlA+”Eritrea">Eritrea</a></TD><TD>333 </TD><TD Class="tlb"><a href=$urlA+”New_Caledonia">New Caledonia</a></TD><TD>172</TD><TD Class="tlb"><a href=$urlA+”Vietnam">Vietnam</a></TD><TD Class="trbr">242</TD></TR>
Quote
Share

Cory
Cory
Joined
Feb 12, 2005
Last active
Sep 04, 2018
13K1
Member
13K1

Apr 14, 2013#2

Code: Select all

<script type="text/javascript">
//<![CDATA[
$('td.tlb a').each(function () {
    $(this).attr('href', 'http://en.wikipedia.org/wiki/' + $(this).attr('href'));
});
//]]>
</script>
Use that, to rid of all the http://en.wikipedia.org/wiki/ links that are currently deposited on your webpage, you can use the Notepad replace tool (Ctrl + H).

You have other options too, like hosting the HTML or completely generating the page with JavaScript, but they will require more work.
Quote
Share

Cherokee
Cherokee
Joined
Feb 18, 2010
Last active
Jun 07, 2013
Location
Cardiff, Wales
9
Member
9

Apr 14, 2013#3

Thanks Cory! I figured it should be "do-able" but just couldn't get myhead around it.

Your help is greatly appreciated.
Quote
Share