November Code Request

  • 1
  • Praise
  • Updated 6 years ago
Need a code for your site? Can't find it on Google? Explain it to me and Ill try and make it!

I will make a new post about this every month.

Please request as much as you wan't

Best Regards,
Shawn
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
  • happy

Posted 7 years ago

  • 1
Photo of Richard Frogmister Gardner

Richard Frogmister Gardner

  • 30 Posts
  • 2 Reply Likes
i need a good code to add Google analytics to yola free account in html script format and meta data I have a domain with godaddy.com richyscomputers.info or dns settings to input in go daddy dns servers cant find it any were and was told by go daddy that there is a way around it via entering a dns entry on my account with go daddy but don’t know how also would like to now how much it would cost for someone to update my site from yola.com
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
It cost nothing. I do stuff for FREE! But Im not sure if I can do this. Haven't worked with Godaddy yet.

I'll see what I can do.

Best Regards,
Shawn
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Richard,

You can add Google Analytics to your site. Please see these instructions.

Are you wanting to have a web designer assist with your site? We are partnered with HP Logoworks who can design your site for you! For more information, please visit this link.
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
Hi Shawn.
Thanks for the offer. Good job.
I'm looking for a Javascript "breadcrumbs" function for my Yola site. I' ve looked at a few free ones but can't get any to work. I have about 25 pages, and want to create a row of links (up to about 5) at the bottom of the page that grows as people move, each link showing the name of the page that it will return to. Not its whole URL, just the name. When they return to the Home page, or exit the site I think the links should all be removed. Since it needs to work on every page, Id like to put the main function code on a separate page ( on an HTML or Text widget) and a small piece of code on each page that accesses this code. Any chance ?
Photo of Brianna

Brianna

  • 2045 Posts
  • 92 Reply Likes
Great place to seek advice, Richard. I am hopeful Shawn will have some ideas for you!
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Philip, here's a code I tricked out so you can use it:



<script type="text/javascript">
/* The variable below determines where the Breadcrumb links will be located.
At the moment it is set to the ID defalt. This can be displayed on the webpage
like this:

<div id="default"></div>

Note: Do not add this inside the tages script and it must be an id
*/
var locate = "default";

/* The variable below determines what the home page, or the root directory,
of your site is named. The default is "Home". To use the address of your
site (www.yoursite.com), leave the value blank (nothing between the double quotes). */

var homePage = "Home";

/* The variable below controls the character(s) that the script places between
the link levels. The default is set to be the > (greater than) HTML entity
with a space on either side. Change this to whatever you want, but if the
character has an HTML entity, be sure to use that. */

var sepChars = " > ";

/* In most cases, the value below should just be a / sign. Or, you can use the
fully qualified http://www.yoursite.com address if you'd rather. Basically,
it just tells the script what all the link addresses will start with. */

var linkHome = "/";

/* Leave the value below set to 'true' if you want the script to not list your
index page name (index.html) at the end of the links path. The values 'true' or
'false' should be used without quotes. */

var hideIndex = true;

/* Leave the value below set to 'true' if you want the script to convert any
underscores in directory or names to spaces. For instance, it would convert
"golive_actions" to "golive actions". The values 'true' or 'false' should be
used without quotes. */

var UToSpace = true;

/* Leave the value below set to 'true' if you want the script to convert any dashes
in directory or page names to spaces. For instance, it would convert "golive-actions"
to "golive actions". The values 'true' or 'false' should be used without quotes. */

var DToSpace = true;

/* The variable below allows you to change the capitalization of the directory and
pages names in your menu. The value should be a number between 0 and 3, without
quotation marks. Options are as follows: 0 = no change; 1 = initial caps;
2 = all upper case; 3 = all lower case */

var changeCaps = 3;

/* If set to true, the variable below will not display the file's extension for
any file names displayed in the menu. Otherwise, set to false to show extensions.
The values 'true' or 'false' should be used without quotes. */

var hideExt = true;

//-------------------------------------------------------------------------
// SCRIPT FUNCTIONS (shouldn't need to edit code below)...
//-------------------------------------------------------------------------

// build breadcrumb links...
function MPJSBackLinks() {
var linkHTML = '';
var thisURL = window.location + '';
var urlPair = thisURL.split('//');
if (urlPair.length > 1) thisURL = urlPair[1];
var dirArray = thisURL.split('/');
var linkArray = dirArray.slice(1);
var linkDir = '/';
var currentPage = '';
if (linkHome != '' && linkHome != '/') {
var thisTest = linkHome.split('//');
if (thisTest.length > 1) linkHome = thisTest[1];
startArray = linkHome.split('/');
var backCount = 0;
for (var n=0; n<startArray.length; n++) {
if (startArray[n] == '..') backCount++;
else break;
}
if (backCount > 0) {
var part1 = dirArray.slice(0, (dirArray.length - backCount - 1));
var part2 = startArray.slice(backCount);
startArray = part1.concat(part2);
} else {
var newStart = new Array(dirArray[0]);
for (var n=1; n<startArray.length; n++) {
var thisTest = (typeof dirArray[n] != "undefined") ? dirArray[n] : false;
if (thisTest && thisTest == startArray[n]) newStart[n] = startArray[n];
else break;
}
startArray = newStart;
}
if (startArray.length > 1) {
var lastOne = startArray[startArray.length - 1];
if (lastOne != '') {
var thisTest = lastOne.split('.');
if (thisTest.length > 1) startArray[startArray.length - 1] = '';
else startArray[startArray.length] = '';
}
if (homePage == '') homePage = startArray[startArray.length-2];
linkArray = dirArray.slice(startArray.length - 1);
if (startArray[0] != '') startArray[0] = "http://"+startArray[0];
linkDir = startArray.join('/');
} else linkArray = dirArray.slice(1);
} else {
linkArray = dirArray.slice(1);
if (homePage == '') homePage = dirArray[0];
}
var backTrack = 1;
if (linkArray[linkArray.length - 1] != '') {
var lastOne = linkArray[linkArray.length - 1];
var testName = lastOne.split('.');
if (testName[0] == 'index' || testName[0] == 'default') {
backTrack = 2;
currentPage = linkArray[linkArray.length - 2];
} else if (hideExt) currentPage = testName[0]
else currentPage = lastOne;
} else {
backTrack = 2;
currentPage = linkArray[linkArray.length - 2];
}
var html = '';
if (linkArray.length >= backTrack) {
linkArray = linkArray.slice(0, linkArray.length - backTrack);
var links = new Array();
if (homePage != '') {
homePage = MPBCParseText(homePage, UToSpace, DToSpace, changeCaps);
links[links.length] = '<a href="'+linkDir+'">'+homePage+'</a>';
}
var baseDir = linkDir;
for (var n=0; n<linkArray.length; n++) {
baseDir += linkArray[n] + '/';
var thisText = MPBCParseText(linkArray[n], UToSpace, DToSpace, changeCaps);
links[links.length] = '<a href="'+baseDir+'">'+thisText+'</a>';
}
if (currentPage != '') links[links.length] = MPBCParseText(currentPage, UToSpace, DToSpace, changeCaps);
html = '<div class="mp_backlinks">'+links.join(sepChars)+'<

0) {
var part1 = dirArray.slice(0, (dirArray.length - backCount - 1));
var part2 = startArray.slice(backCount);
startArray = part1.concat(part2);
} else {
var newStart = new Array(dirArray[0]);
for (var n=1; n 1) {
var lastOne = startArray[startArray.length - 1];
if (lastOne != '') {
var thisTest = lastOne.split('.');
if (thisTest.length > 1) startArray[startArray.length - 1] = '';
else startArray[startArray.length] = '';
}
if (homePage == '') homePage = startArray[startArray.length-2];
linkArray = dirArray.slice(startArray.length - 1);
if (startArray[0] != '') startArray[0] = "http://"+startArray[0];
linkDir = startArray.join('/');
} else linkArray = dirArray.slice(1);
} else {
linkArray = dirArray.slice(1);
if (homePage == '') homePage = dirArray[0];
}
var backTrack = 1;
if (linkArray[linkArray.length - 1] != '') {
var lastOne = linkArray[linkArray.length - 1];
var testName = lastOne.split('.');
if (testName[0] == 'index' || testName[0] == 'default') {
backTrack = 2;
currentPage = linkArray[linkArray.length - 2];
} else if (hideExt) currentPage = testName[0]
else currentPage = lastOne;
} else {
backTrack = 2;
currentPage = linkArray[linkArray.length - 2];
}
var html = '';
if (linkArray.length >= backTrack) {
linkArray = linkArray.slice(0, linkArray.length - backTrack);
var links = new Array();
if (homePage != '') {
homePage = MPBCParseText(homePage, UToSpace, DToSpace, changeCaps);
links[links.length] = ''+homePage+'';
}
var baseDir = linkDir;
for (var n=0; n

#47;div>';
}
return html;
}
// parse string through text filters
function MPBCParseText(thisText, UToSpace, DToSpace, changeCaps) {
if (typeof thisText != "undefined" && thisText) {
if (DToSpace) thisText = MPBCReplaceChar('-', ' ', thisText);
if (UToSpace) thisText = MPBCReplaceChar('_', ' ', thisText);
if (changeCaps) thisText = MPBCFixCaps(thisText, changeCaps);
} else thisText = '';
return thisText;
}
// find and replace single character in string...
function MPBCReplaceChar(oldChar, newChar, thisString) {
var newString = '';
for (var n=0; n<thisString.length; n++) {
newString += (thisString.charAt(n) == oldChar) ? newChar : thisString.charAt(n);
}
return newString;
}
// determine changes in capitalization...
function MPBCFixCaps(thisString, changeCaps) {
if (changeCaps == 1) thisString = MPBCUCWords(thisString);
else if (changeCaps == 2) thisString = thisString.toUpperCase();
else if (changeCaps == 3) thisString = thisString.toLowerCase();
return thisString;
}
// capitalize the first letter of every word...
function MPBCUCWords(thisString) {
var thisArray = thisString.split(' ');
var newString = '';
for (var n=0; n<thisArray.length; n++) {
var firstChar = thisArray[n].charAt(0).toUpperCase();
var theRest = thisArray[n].substring(1, thisArray[n].length);
newString += firstChar+theRest+' ';
}
return newString.substring(0, newString.length - 1);
}
document.getElementById(locate).innerHTML = MPJSBackLinks();
</script>



This is the long version with many little things telling you want to do.

If you don't need that look here:


<script type="text/javascript">
function MPBCUCWords(a) {
var b = a.split(" ");
var c = "";
for (var d = 0; d < b.length; d++) {
var e = b[d].charAt(0).toUpperCase();
var f = b[d].substring(1, b[d].length);
c += e + f + " "
}
return c.substring(0, c.length - 1)
}
function MPBCFixCaps(a, b) {
if (b == 1) a = MPBCUCWords(a);
else if (b == 2) a = a.toUpperCase();
else if (b == 3) a = a.toLowerCase();
return a
}
function MPBCReplaceChar(a, b, c) {
var d = "";
for (var e = 0; e < c.length; e++) {
d += c.charAt(e) == a ? b : c.charAt(e)
}
return d
}
function MPBCParseText(a, b, c, d) {
if (typeof a != "undefined" && a) {
if (c) a = MPBCReplaceChar("-", " ", a);
if (b) a = MPBCReplaceChar("_", " ", a);
if (d) a = MPBCFixCaps(a, d)
} else a = "";
return a
}
function MPJSBackLinks() {
var a = "";
var b = window.location + "";
var c = b.split("//");
if (c.length > 1) b = c[1];
var d = b.split("/");
var e = d.slice(1);
var f = "/";
var g = "";
if (linkHome != "" && linkHome != "/") {
var h = linkHome.split("//");
if (h.length > 1) linkHome = h[1];
startArray = linkHome.split("/");
var i = 0;
for (var j = 0; j < startArray.length; j++) {
if (startArray[j] == "..") i++;
else break
}
if (i > 0) {
var k = d.slice(0, d.length - i - 1);
var l = startArray.slice(i);
startArray = k.concat(l)
} else {
var m = new Array(d[0]);
for (var j = 1; j < startArray.length; j++) {
var h = typeof d[j] != "undefined" ? d[j] : false;
if (h && h == startArray[j]) m[j] = startArray[j];
else break
}
startArray = m
}
if (startArray.length > 1) {
var n = startArray[startArray.length - 1];
if (n != "") {
var h = n.split(".");
if (h.length > 1) startArray[startArray.length - 1] = "";
else startArray[startArray.length] = ""
}
if (homePage == "") homePage = startArray[startArray.length - 2];
e = d.slice(startArray.length - 1);
if (startArray[0] != "") startArray[0] = "http://" + startArray[0];
f = startArray.join("/")
} else e = d.slice(1)
} else {
e = d.slice(1);
if (homePage == "") homePage = d[0]
}
var o = 1;
if (e[e.length - 1] != "") {
var n = e[e.length - 1];
var p = n.split(".");
if (p[0] == "index" || p[0] == "default") {
o = 2;
g = e[e.length - 2]
} else if (hideExt) g = p[0];
else g = n
} else {
o = 2;
g = e[e.length - 2]
}
var q = "";
if (e.length >= o) {
e = e.slice(0, e.length - o);
var r = new Array;
if (homePage != "") {
homePage = MPBCParseText(homePage, UToSpace, DToSpace, changeCaps);
r[r.length] = '<a href="' + f + '">' + homePage + "</a>"
}
var s = f;
for (var j = 0; j < e.length; j++) {
s += e[j] + "/";
var t = MPBCParseText(e[j], UToSpace, DToSpace, changeCaps);
r[r.length] = '<a href="' + s + '">' + t + "</a>"
}
if (g != "") r[r.length] = MPBCParseText(g, UToSpace, DToSpace, changeCaps);
q = '<div class="mp_backlinks">' + r.join(sepChars) + "</div>"
}
return q
}
var locate = "default";
var homePage = "Home";
var sepChars = " > ";
var linkHome = "/";
var hideIndex = true;
var UToSpace = true;
var DToSpace = true;
var changeCaps = 3;
var hideExt = true;
document.getElementById(locate).innerHTML = MPJSBackLinks();
</script>


Add either code in an html widget with its correct HTML code.
If you need any other help. Please tell me.

Best Regards,
Shawn
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Wait, I just tested this and it doesnt seem to work on the pages while it works on the yola editor. Hmm, weird.
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
Great ! Thanks Shawn. I was hoping there would be some "comment" lines so I could learn a bit of JS, and it's got lots of them . Even if it doesn't work at the moment, I'm sure the script is basically ok, and I can learn from it and (hopefully) get it working.
Thanks again. Have a great day.
Photo of Bernhardt

Bernhardt

  • 70 Posts
  • 0 Reply Likes
Hi Shawn...

You can have a look at my website... changed quite a bit... www.helderbergads.com

I was wondering if you can code me a nice html calender to fit there in the right side of my webpage... about the same size as one of my ad spaces?

Thanks :)
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
That is possible but that might take weeks to make. So sorry. For right now I can't. :(

Best Regards,
Shawn
Photo of Bernhardt

Bernhardt

  • 70 Posts
  • 0 Reply Likes
no prob :)
Photo of safi ullah

safi ullah

  • 142 Posts
  • 9 Reply Likes
i want a code which shows popular content of my site on my homepage can anyone help me in it.
Photo of safi ullah

safi ullah

  • 142 Posts
  • 9 Reply Likes
hope that anyone knows it waiting for reply
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Safi, I was not answering because that question is very impossible for me to do. Also, when it comes to grammar, spelling, and capitalization on a forum, i'm very OCD.

Please not that this is not fully correct:

i want a code which shows popular content of my site on my homepage can anyone help me in it.

This is though:

I want a code which shows popular content of my site. This will be placed on my homepage for everyone to see. I hope someone can help me with this.

Thank you.
Safi

Doesn't that look nicer?

Well, like I was saying, sorry, but I can't do this as i'm not sure how. What I do know, is that PHP is needed.

Best Regards,
Shawn
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
Do you mean links to other pages on your site, or do you mean news, music and other feeds ?
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
Sorry Shawn... I'll leave it to you.
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
You can help, if you want, everyone makes mistakes,

Best Regards,
Shawn
Get HTML Help
Photo of safi ullah

safi ullah

  • 142 Posts
  • 9 Reply Likes
Sorry about the mistakes i will be careful next time.Thanks for making me notice about mistakes.
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
He meant me making mistakes, not you, lol
I make enough for both of us !
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Philip, safi meant the mistake about that I posted above.

Best Regards,
Shawn
Get HTML Help
Photo of Avian

Avian

  • 6 Posts
  • 0 Reply Likes
Hey all... I'm trying to look for a way to take away "white space" at the bottom of one of the sites i'm doing. I've looked through different types of code but nothing is working. Can someone please help me out? The sites address is www.nunipicreations.co.za if you look at the bottom of each page there is just blank space there.
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
I believe your page is on a text widget. If so, just go into the page, step down to the bottom and delete the blank lines.
Photo of Avian

Avian

  • 6 Posts
  • 0 Reply Likes
It's the actual template... The text widget is not interfering with the bottom of the website.
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Avian, this is your template. I check the Google Chrome DEV but I can find if there is an element causing this space.

Best Regards,
Shawn
Get HTML Help :)
Photo of Super Man

Super Man

  • 7 Posts
  • 0 Reply Likes
Hi Shawn i nned a navigation menu like cnet.com have.Can you make a menu like it.I want to put it on my site.
Photo of Shawn Holman

Shawn Holman

  • 486 Posts
  • 26 Reply Likes
Super Man,

Do you need it exactly like it? Or do you just want a dropDown menu?

Best Regards,
Shawn
Photo of Super Man

Super Man

  • 7 Posts
  • 0 Reply Likes
Well Shawn i would like to see exactly like that.Can you make exactly or similar menu like cnet.
Photo of Lorenzo Alberto Arteaga Avila

Lorenzo Alberto Arteaga Avila

  • 2 Posts
  • 0 Reply Likes
hey shawn I'm trying to make my website have an intro with the background faded when someone goes to it and i also need it to be able for it to be skip if users wish to is there a way for you to make a code. I have my video https://www.youtube.com/watch?v=9Ohar_...
please write back of email me back
lorenzoarteaga@gmail.com
Photo of Bosco Tung

Bosco Tung

  • 4 Posts
  • 0 Reply Likes
I'd LOVE to put a slider into my page but don't know how to.

Yola has quite a few restrictions that I don't know how to get around and hoping maybe someone could help here.

http://www.blogohblog.com/20-killer-i...

A lot of the image sliders on that page are amazing but they require jQuery. Made for wordpress I guess but how can I install something like that onto my Yola page?

This reply was created from a merged topic originally titled
jQuery and Yola (how?).