Welcome Guest.   Make a donation to an author on the site August 01, 2014, 11:36:19 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Trying To Adjust My Blog Template- Can anyone help with code?  (Read 1122 times)
Erika305
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« on: April 28, 2012, 12:41:54 PM »

Hi!

I am trying to adjust my blog template.

I was up for HOURS trying to see if I could figure out how to tweak this code to allow for 14 categories(labels) for this blog template but I couldn't do it. You know how you label each post to categorize it.

If you look at this template, in the picture you'll see how it is soo awesome and lists the content by category with the latest posts automatically generating at the top for each category (label). Its awesome and it works but it only allows for 4 categories and I need 14-16 to showcase all different types of content.

Do you have any suggestions for how to duplicate this code to make it what I need? I attached the Template with the XML extension as well as a JPEG of the way the template looks when loaded. You will find the "array" is the name of each category in the html code part. Some of it may be in Portugese because that is where the coder is from.


Haha! I feel so smart talking HTML with you! LOL* Template_Feminina.xml (170.63 KB - downloaded 113 times.) [ ERROR: SPECIFIED ATTACHMENT MISSING ]
Logged
rgdot
Supporting Member
**
Posts: 1,568


View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: April 28, 2012, 01:09:15 PM »

This defines the four

Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1. var contarlabels = 0;
  2. labelname = new Array("Beauty","Gastronomy","Fashion","Lorem");
  3. labeltitle = new Array("Beauty","Gastronomy","Fashion","Lorem");

and this cycles through

Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1. salida += '<div class="featured">';
  2. salida += '<h3>' + labeltitle[contarlabels] + '</h3>';
  3. salida += salidainner;
  4. salida += '<b><a href="http://femininamagazine-btemplates.blogspot.com/search/label/' + labelname[contarlabels] + '?max-results=10">More '+ labelname[contarlabels] +'</a></b>';
  5. salida += '</div>';
  6. document.write(salida);
  7. contarlabels ++;
  8. }

The array has 4 values. Other categories names can be added to the array.

I am NOT a programmer but have some idea...
Logged
Erika305
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #2 on: April 28, 2012, 01:20:24 PM »

Thanks. I tried to just- add more labels- but when I loaded the template it only displayed the last four labels.

I am not sure how you are suggesting with the 2nd pic you included, that I can change the number of arrays. How do I do that?

But thanks so much for even looking at it for me!
Logged
rgdot
Supporting Member
**
Posts: 1,568


View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: April 28, 2012, 01:36:33 PM »

No problem. If I can't one of the real programmers will  cheesy



Logged
Erika305
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #4 on: April 28, 2012, 01:42:30 PM »

Are you saying that the 2nd code you posted is the adjustment I need to create more arrays?
Logged
rgdot
Supporting Member
**
Posts: 1,568


View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: April 28, 2012, 02:26:23 PM »

No, that's there. It reads through the array of the first.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.036s | Server load: 0.21 ]