Hi everyone,
I'm pretty new to elgg. I was learning how to create basic plugins in elgg 1.7.7
There is a tutorial on how to create your first basic "Hello World" widget here: http://docs.elgg.org/wiki/Tutorials/HelloWorld
Everything went fine till the part "Allow User Customization". No matter what I try, I cannot get this working.
The string that the user enters is saved in $widget->message
But it is NOT CARRIED OVER to the view.php (OR content.php in elgg 1.8).
The variable $widget->message is UNSET in view.php and as a result, no text appears.
I hope I have been pretty clear regarding my problem. I have followed the tutorial word by word. Is there an error in the tutorial (I highly doubt it) or am I missing something BIG here?
Please help me out with this issue. I feel I'm overlooking some really basic things here.
Many Thanks! :)
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.
- Cash@costelloc
Cash - 0 likes
- Skullo@Wiseindy
Skullo - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- Cash@costelloc
Cash - 0 likes
- Skullo@Wiseindy
Skullo - 0 likes
You must log in to post replies.Would need to see your code to comment.
start.php contains:
edit.php contains:
view.php contains:
Skullo,
Your code is mixing Elgg 1.8 and Elgg 1.7.x requirements. Eg., you are using view.php (Elgg 1.7.x) but elgg_register_widget_type() (Elgg 1.8). As Elgg 1.8 has not been released yet, it would be safer to stick to 1.7.x. Read the wiki again and note the differences.
Looks like we need separate 1.7 and 1.8 documentation. Here is the 1.7 only hello world tutorial: http://docs.elgg.org/w/index.php?title=Tutorials/HelloWorld&oldid=3657
Hey Cash and Kevin... Thanks a lot for your help. I finally figured out the problems. There were two issues:
1) I had to replace "elgg_register_widget_type()" with "add_widget_type()" as suggested.
2) And I also had to make another small change in the edit.php file.
'name' => 'params[message]' had to be modified to
'internalname' => 'params[message]'
Thanks a lot! :)