dear Guys,
I ve been repeating over and over the helloworld tutorial for these 3 days...
it always have the some problem... empty widget.
for showing world "hello" it just fine, but when it comes to user input part, nothings happen...
is any one had the some problem? could you tell me what mistake have i done please help.
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.
You will need to give far more information than you have given! You ask for people to tell you what mistakes you have done but with no info how is this possible? Sure when you are more specific you will get an answer that will help you out.
@aqge - walk us through what you've done so far (including the relevant code you're using) and we'll see what we can do. :-)
thank you,
i ve never thought it would be such fast response.
this is what i ve done, just exactly what the tutorial ask me to..
1. create folder under mod/hello/
2. new page start.php with code bellow
<?php
function hello_init() {
add_widget_type('helloworld', 'My Widget', 'The hello, world widget');
}
register_elgg_event_handler('init','system','hello_init');
?>
3. copy manifest from one of the mod to /mod/hello/ and modified to several string value to:
<?xml version="1.0" encoding="UTF-8"?>
<plugin_manifest>
<field key="author" value="Aqge Priwibowo"/>
<field key="version" value="1.0"/>
<field key="description" value="Hello Word untuk uji coba" />
<field key="website" value="http://www.elgg.org/" />
<field key="copyright" value="(C) Curverider 2010" />
<field key="licence" value="Aqge Lisence" />
<field key="elgg_version" value="2009041701" />
</plugin_manifest>
4. build this folder chain
/mod/hello/views/default/widgets/helloworld/
5. i paste the code for view.php and edit.php, both fiel are under the folder chain /mod/hello/views/default/widgets/helloworld/
//edit.php
<p>Message:
<?php
echo elgg_view('input/text', array( 'internalname' => 'params[message]',
'value' => $vars['entity']->message,
'class' => 'hello-input-text' ));
?>
</p>
//view.php
<div class="contentWrapper">
<?php echo $vars['entity']->message; ?>
</div>
on the dashboard (affter setting the pages ) the widget shows with empty empty blank from none but the widget title
hope this will clear the things...
I can't see what you've got wrong so far. Can you post a screenshot of your dashboard with the widget on it please.
Also, check to see if it's working on the profile page.
this the widget name My Widget just the tutorial ask
and the profile i dont understand what you mean about it
by the way the code i ve wrote what things suppose to come out from it?
Does the edit bit of the widget work?
Eg. if you edit the widget, set the message to "This is my test message.", save the message, refresh the page and then edit the widget again, is the text "This is my test message." still there?
if this what you mean
//edit.php
<p>Message:
<?php
echo elgg_view('input/text', array( 'internalname' => 'params[message]',
'value' => $vars['entity']->message,
'class' => 'hello-input-text' ));
?>
</p>
//=========to=========
//edit.php
<p>This is my test message.
<?php
echo elgg_view('input/text', array( 'internalname' => 'params[message]',
'value' => $vars['entity']->message,
'class' => 'hello-input-text' ));
?>
</p>
//=====================
the answer is no,
if this what you mean
//view.php
<div class="contentWrapper">
<?php echo "this is the message :<br>". $vars['entity']->message; ?>
</div>
===============
the answer is yes it come out , "only the text"
Ok. Go to your dashboard and look at the widget. In the title on the right you'll see "EDIT". Click that. There should be a textfield to enter information. Put some text into that and click save.
Then see what your widget says.
ooo my god....
Some one should told me about these...
How Stupid i m,
Thank alot trajan....
- Previous
- 1
- 2
- Next
You must log in to post replies.