SOLVED !!! Hide the number of donors

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 8 months ago - 6 years 7 months ago #111968 by Michael Redmond
SOLVED !!! Hide the number of donors was created by Michael Redmond
Is there anyway to hide the number of donors in the front end display of a campaign?
See the attached screen shot.



The amount donated is OK. I only want to hide the number of donors.
Attachments:
Last edit: 6 years 7 months ago by Mr. Dam.

Please Log in or Create an account to join the conversation.

More
6 years 8 months ago #112053 by Mr. Dam
Replied by Mr. Dam on topic Hide the number of donors
Hi,
To hide the numbers of donors in Campaigns list, please follow these steps
1. Create folder: root > templates > you_using_template > html > com_jdonation > categories
2. Copy file
root > components > com_jdonation > view > categories > html > default.php into new created folder
3. Open that file by notepad for modifying
4. Find code
Code:
<strong class="darkgray"><?php echo (int)$item->number_donors; ?> </strong><span><?php echo JText::_('JD_DONORS'); ?></span>
And remove it
Good luck
Dam

Please Log in or Create an account to join the conversation.

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 8 months ago #112080 by Michael Redmond
Replied by Michael Redmond on topic Hide the number of donors

2. Copy file
root > components > com_jdonation > view > categories > html > default.php into new created folder


As you can see in the attachment, the subdirectories CATEGORIES does not exist in my file structure.

Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #112240 by Mr. Dam
Replied by Mr. Dam on topic Hide the number of donors
Hi Michael,
I am sorry, the folder is "campaigns" not "categories"
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 months ago #112266 by Michael Redmond
Replied by Michael Redmond on topic Hide the number of donors
That did it.

Just some minor mods to your instructions:

1. Create folder: root > templates > you_using_template > html > com_jdonation > categories

This should be "campaigns" rather than "categories".

2. Copy file
root > components > com_jdonation > view > categories > html > default.php into new created folder


This should be :
root > components > com_jdonation > view > campaigns > tmpl > default.php

Thanks for your help.

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #112300 by Mr. Dam
Replied by Mr. Dam on topic Hide the number of donors
Ok Michael

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #112616 by Dave
Replied by Dave on topic Hide the number of donors
I cannot make this work. Something is wrong.

I have published Donations Campaign module to a page on my dev site (localhost).
The module works.
I only have 1 campaign.
The published module shows title, Amount Raised, Amount Goal, % Donated, No Donors, Days Left, etc, etc.
It works.

I directly edited C:\xampp\htdocs\mysite\components\com_jdonation\view\campaigns\tmpl\default.php .
I deleted lines 69-97,
which is the entire rowFluidClass div, then I saved the file, cleared site cache, cleared browser cache, loaded page.
Nothing happened. Nothing changed.

I tried this with Configuration > Activate campaign feature set to No, and also set to Yes.

I tried this by copying the default.php file to a new folder in my template folder and then editing the copied file.
I did this in C:\xampp\htdocs\mysite\templates\my_template\html\com_jdonation\campaigns\default.php.

I also tried it in my Local folder:
C:\xampp\htdocs\mysite\templates\my_template\local\html\com_jdonation\campaigns\default.php

If I change default.php, it does not change the display of Donations Campaign, no matter which folder I copy default.php to, or how often I clear cache.

Crikey man. It can''t be that hard to customize a few things on the extension.

What up?

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #112692 by Mr. Dam
Replied by Mr. Dam on topic Hide the number of donors
Hi,
If you want to modify Campaigns module, you should modify file:
root > modules > mod_jd_campaigns
instead of campaigns layout.
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #112695 by Dave
Replied by Dave on topic Hide the number of donors
Yah, I figured this out.

To modify the structure or content of the Donation Campaigns module, make your changes in
root/modules/mod_jd_campaigns/tmpl/default.php.

These are core mods. Keep a diary of the changes you make to this file, and also a copy of the modified file.

After future updates, if the code structure is unchanged, you just replace the standard default.php with your modified version.
If the code structure changed significantly, you find the elements that you changed in default.php (consult your diary), then repeat the changes to those elements in whatever new file they are now residing in.

Thx.

Dave

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamDũng Nguyễn Việt