Hello,
Happy 2018 to you all...
I actually have 2 issues right now!, and I require some help...
===>1.
I want to include/add a line of code into 'page/elements/comments_block' and I want some help...
$title = elgg_extract('title', $vars);
The above line of code must be included/added by a hook or any related method...
===>2.
I am getting 'Page Not Found' error when doing unit tests...
http://mydomain.xyz/engine/tests/suite.php
Regards,
Praveen Thomas
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 1 like
- Praveen Thomas@p3core
Praveen Thomas - 0 likes
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 1 like
- Copy the comments_block.php file to /mod/your_custom_plugin/views/default/page/elements folder.
- Edit the line $title = elgg_echo('generic_comments:latest') to $title = ucfirst(elgg_extract('subtypes', $vars))." Comments"
- Flush the cache
- Run an upgrade
- Praveen Thomas@p3core
Praveen Thomas - 0 likes
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 1 like
- Praveen Thomas@p3core
Praveen Thomas - 0 likes
- Rohit Gupta@Rohit_1990_3676
Rohit Gupta - 1 like
- Praveen Thomas@p3core
Praveen Thomas - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
@Praveen Thomas You can start with my https://elgg.org/plugins/2439715 or welcome to eStore
- Praveen Thomas@p3core
Praveen Thomas - 0 likes
You must log in to post replies.For Point #1 - use a custom plugin, try elgg_extend_view and add the required code to the view. The only thing that confuse me is why do you want to add $title = elgg_extract('title', $vars) in the view? If you are trying to change $title = elgg_echo('generic_comments:latest') then I will suggest that in your custom plugin copy the original file and make the required changes in your plugin's file as per your requirement.
@Rohit Gupta,
I am trying to change the default title [Latest Comments] to a custom one...
For blogs, Blog comments...
For Pages, Page comments...
For Files, File comments...
And, so on...
To my understanding!, page/elements/comments_block must be edited...
I want to include/add the custom code via start.php...
You must not edit the core code but you have to make a copy of the file in your custom plugin and modify the code.
I don't this that is possible using start.php. Here's a simple solution.
Done!
Hope this helps.
@Rohit Gupta,
Awesome Bro!, You're the man...
The titles are working perfectly!, but it's not working for pages subtype...
For pages subtype!, it's rendering as just Comments...
Any idea why it's not working for pages subtype?, Please do let me know...
Flushed the cache...
Ran the upgrade...
Try this
@Rohit Gupta,
I thought I can use standard view override for pages subtype and use your solution for other subtypes!, but your solution for pages is even better...
Awesome Bro!, Thanks a lot...
Welcome bro!
@Rohit Gupta,
Are there any Theme Builder plugins for Elgg?, or where can I get good themes...
I can try to write a Theme from scratch!, but that will take a long time...
The ElggZone Team [http://perjensen-online.dk] is sun-setting!, and so can't get one...
Looking forward to hear from you...
@RvR,
I will definitely check it out...
Thanks