Welcome, Guest
Username Password: Remember me

Month link shows all articles for selected month
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Month link shows all articles for selected month

Month link shows all articles for selected month 8 months, 2 weeks ago #19326

Hello!
I have a question:

There are a lot of articles for every month, therefore there are a lot of links in module.
I want like this: I click on the month and it shows me all articles for selected month.

Could you say, how can I change code?

Big thanks for your extension!
  • Oleg
  • OFFLINE
  • Visitante
  • Posts: 2
  • Karma: 0
Last Edit: 8 months, 2 weeks ago by Oleg.

Re: Month link shows all articles for selected month 8 months, 2 weeks ago #19331

Hi,

Later, in mod_lca/assets/lca.js change
function flca(n, id, img) {
var li = "lca_"+n+"_"+id;
var a = "lca_"+n+"a_"+id;
if (document.getElementById(li)) {
if (document.getElementById(li).style.display == "none") {
lca_add(n, id);
document.getElementById(li).style.display = "";
if (img)
document.getElementById(a).src = LCA_EXPAND;
else
document.getElementById(a).innerHTML = LCA_EXPAND;
}
else {
lca_delete(n, id);
document.getElementById(li).style.display = "none";
if (img)
document.getElementById(a).src = LCA_COLLAPSE;
else
document.getElementById(a).innerHTML = LCA_COLLAPSE;
}
}
lca_save();
}


By
var lca_month_opened = 0;
 
function lca_open(img, id) {
if (img)
document.getElementById(id).src = LCA_EXPAND;
else
document.getElementById(id).innerHTML = LCA_EXPAND;
}
function lca_close(img, id) {
if (img)
document.getElementById(id).src = LCA_COLLAPSE;
else
document.getElementById(id).innerHTML = LCA_COLLAPSE;
}
function flca(n, id, img) {
var li = "lca_"+n+"_"+id;
var a = "lca_"+n+"a_"+id;
if (document.getElementById(li)) {
if (document.getElementById(li).style.display == "none") {
lca_add(n, id);
document.getElementById(li).style.display = "";
lca_open(img, a);
}
else {
lca_delete(n, id);
document.getElementById(li).style.display = "none";
lca_close(img, a);
}
}
if (n == 1) {
li = 'lca_1_'+lca_month_opened;
if (document.getElementById(li)) {
a = "lca_1a_"+lca_month_opened;
lca_delete(1, lca_month_opened);
document.getElementById(li).style.display = "none";
lca_close(img, a);
}
lca_month_opened = id;
}
lca_save();
}


I have not tested it, if doesn't work tell me it

PD: Maybe you should set "Always collapsed" to yes
  • JoniJnm
  • OFFLINE
  • Administrador
  • Posts: 4297
  • Karma: 148
Last Edit: 8 months, 2 weeks ago by JoniJnm.

Re: Month link shows all articles for selected month 8 months, 1 week ago #19351

JoniJnm, I changed the code and tested, but unfortunately it works like without any changes
  • Oleg
  • OFFLINE
  • Visitante
  • Posts: 2
  • Karma: 0

Re: Month link shows all articles for selected month 8 months ago #19369

I have tested it and works. You can download the latest version, it has the new feature. Delete the cache in Joomla and in your browser =)
  • JoniJnm
  • OFFLINE
  • Administrador
  • Posts: 4297
  • Karma: 148

Re: Month link shows all articles for selected month 7 months, 2 weeks ago #19469

Hi, there. I also looking for the same. I want to be able to put a link on a month.

I have follow your direction here, but the code isnt the same. (i have the latest version).

Can you give me some direction how to solve this?

Thanks a lot.
  • Page:
  • 1
Time to create page: 0.53 seconds