Posted by planctus on January 7, 2008 at 6:04pm
Jump to:
| Project: | Help Tip |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi, i just found this useful module and tried to use it.
Everything worked but i had to "hack" .module cause i'm using it in a multilanguage site and i needed support for i18n.
The point is:
whydid you choose to show only the teaser of the help-tip node?
I mean, if you give advices on a specific page it doesn't make sense to me that user have to move from that page after clicking on the read more link to another one and then go back....woh...little bit confusional.
So i'm trying to display the full node of the tip and i think that the relative code is the one below.
Can you give me a piece of code to show the full node instead of the teaser?
Thanks,
Da.
<?php
function theme_helptip_body($node) {
if ($node->teaser = check_markup($node->teaser, $node->format, FALSE)) {
// calculate body, too, as it controls the 'read more' link.
$node->body = check_markup($node->body, $node->format, FALSE);
return '<div class="helptip">' . $node->teaser .
theme('helptip_links', $node) . "</div>\n";
}
}
?>
Comments
#1
I'm not a php developer, sorry, i don't know almost anything about php, but working with drupal causes this, i've to try, make errors and then find a primitive solution.
This is what i did, i just changed $node->teaser to $node->body to show the full body of the tip.
I think this is just a workaround not exactly a different implementation of the tip view.
i post this for now, maybe you will change what i did for other users to come.
Thanks,
Da.
<?phpfunction theme_helptip_body($node) {
if ($node->teaser = check_markup($node->teaser, $node->format, FALSE)) {
// calculate body, too, as it controls the 'read more' link.
$node->body = check_markup($node->body, $node->format, FALSE);
return '<div class="helptip">' . $node->body .
theme('helptip_links', $node) . "</div>\n";
}
}
?>
#2
I don't understand exactly what the issue is. Are you saying that the node body is translated, but the teaser is not? How does this have to do with i18n?
You can easily control how much of the helptip is shown by placing "" in the helptip body. Which is how you control the teaser length of any node.
#3
Sorry, i try to make it easier:
I needed to "patch" the module in order to get it responsive to the multilanguage system, but i already did it when i wrote this issue following the answer in another issue about this module.
This was ok, then i needed to show the full node of the help tip content type cause in the "default" behaviour it showed only the teaser, linking to the full node in another page.
I've just changed the "teaser" with "body" in the code i posted here and it worked so this is not an issue anymore for me, but i thought that you may consider the problem so i left it open.
What i mean is that i find more consistent with the primary goal of this module showing the full node and not the teaser of the help tip in the block provided.
Thanks,
Da.
#4
ok, think it was time to close this issue
by,
Da.