SimplePortal
Support => International Support => Spanish => Topic started by: fapencio on May 02, 2014, 12:12:13 AM
-
Hola, pido ayuda por favor para que me ilustren y me enseñen a poner los botones "me gusta" y "google +" en los bloques que aparecen en el Portal o Home, también llamado "Board News", de preferencia justo al lado izquierdo de donde dice "Leer más | Escribir comentario"
gracias de antemano ;D
-
Fapencio,
Have you installed a mod for "like" and "+1" on your forum? Do these buttons appear on your posts?
-
Hi Angelina, yep, i have installed this mod and these buttons appear on my post, BUT not appear
in the Home Portal, in the block "Board News", i want this:
(http://i56.servimg.com/u/f56/15/36/53/57/captur18.jpg)
Is there any way to put social buttons on the block "board news" ?
-
This is going to require some customization.
Look in the file PortalBlocks.php
You will see the boardnews function.
Near the end of the function, you will see where all the HTML is echo'd out.
You need to think about where you would put the icons for each item.
And you would need to look at what that mod has done to your display.template.php and/or $context to put those icons and link information into the post display.
Basically, you will have to modify the boardnews block to do some of what the mod does.
This is definitely about customization.
-
:| :( :'( ok, thanks
-
One step at a time. Talk to the other mod author for advice on how you can add the icons to a custom template. It will be ok
-
si alguien nos puede ayudar con esta petición por favor, este tip es muy solicitado y espero lo implementen en la nueva versión de simpleportal, tan solo fíjense en las visitas que ha tenido esta petición, mas de 1500 y contando, un saludo a todos y si alguien ya lo pudo implementar en su web, que nos ayude por favor :-[
-
creo q esta facil de hacer :D las visitas son puros bots :thumbsdown:
-
fapencio,
The customization in PortalBlocks.php will be easy.
Please find out how those icons are added to your posts now.
Then you can do the same in sp_boardNews.
You will probably want to look in Display.php and Display.template.php -- or else ask the mod author for advice on where to look.
-
ya casi 2500 vistas tiene este post, es una lástima que haya personas que pueden ayudar con esto y tienen conocimientos y no lo hacen, si logro encontrar la forma de hacerlo antes de que alguien me ayude, les compartiré el tip en este post, saludos
-
Fapencio, I don't know how to find out how many people have viewed this topic.
I do know that, if you talk to the mod author, you will learn valuable information. If you share that here, I, and others, can help you make the customization.
Not everyone speaks Spanish. The conversation might get more help in the customization board, perhaps in English, even with the help of Google Translate
-
is true AngelinaBelle, thanks for the tip
-
I hope it is good advice, and you are able to make your customization very soon.
Saludos!
-
esto lo estamos esperando muchos usuarios de simpleportal por eso hay muchas visitas a este post, ojalá alguien se anime a ayudarnos
-
In the meantime, please contact the author of "like button" mod for advice. This will help.
-
help please
-
Of course! What did the author of your "like button" mod tell you?
-
this is the mod:
http://custom.simplemachines.org/mods/index.php?mod=3559
thanks in advance :D
-
Did you ask for information on how to add the button to custom templates?
-
I think there is a clue here: http://www.simplemachines.org/community/index.php?topic=494062.msg3655886#msg3655886
So first, we must begin with "board news". But here is your question: Do you want to "like" the topic or do you want to "like" the post?
-
like the topic, thanks AB :-[
-
So then, please have a look in POrtalBlocks.php. look in the function sp_boardNews.
Scroll down. See where all the information is written to the board news block?
foreach ($return as $news)
foreach ($return as $id_topic => $news)
Now, it will be possible to add some HTML like this into the output, somewhere, depending on where you want to put it:
if (!empty($modSettings['facebook_like'])) {
echo '
<div id="fb-root"></div>
<div style="margin-left:auto;margin-right:2em;text-align:center;padding-right:12px" class="fb-like" data-href="', $scripturl, '?topic=', $id_topic, '" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="verdana"></div>';
}
Decide where you want that icon to go. Before or after the subject? Before or after the avatar? Before or after the message body?
You decide where you will stick this, and we can help you stick it in the correct place.
-
before of miniavatar please AB
-
1. make the change I gave you above and test that.
You should see no changes, and no errors on your error log.
Once you have done that, move on to the second step (the second step will not work properly without the first one)
2. Make this change and test it. Check for errors in your log. If you have no errors and are happy with the result, then you are done.
if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
if (!empty($modSettings['facebook_like'])) {
echo '
<div id="fb-root"></div>
<div style="margin-left:auto;margin-right:2em;text-align:center;padding-right:12px" class="fb-like" data-href="', $scripturl, '?topic=', $id_topic, '" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="verdana"></div>';
}
if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
If you have any questions about what is going on here and how to fix any typos I might have made, please read
http://www.php.net/manual/en/control-structures.foreach.php (for information on the foreach loop)
http://www.php.net/manual/en/function.echo.php (how php writes out HTML stuff for your users) and
http://www.w3schools.com/html/DEFAULT.asp (for information about HTML)