collapse collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 160
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM
  • phantomm: and from what I see only patch is broken, full install package is fine
    October 21, 2016, 03:44:44 PM

* Recent Posts

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Poner botones sociales en block "board news"  (Read 9857 times)

0 Members and 1 Guest are viewing this topic.

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Poner botones sociales en block "board news"
« 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
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #1 on: May 02, 2014, 10:16:18 AM »
Fapencio,

Have you installed a mod for "like" and "+1" on your forum?  Do these buttons appear on your posts?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #2 on: May 02, 2014, 12:35:03 PM »
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:



Is there any way to put social buttons on the block "board news" ? 
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #3 on: May 02, 2014, 01:03:10 PM »
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.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #4 on: May 02, 2014, 04:33:01 PM »
 :| :( :'(  ok, thanks
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #5 on: May 02, 2014, 05:16:10 PM »
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
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #6 on: May 04, 2014, 11:47:09 AM »
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  :-[
Theme: Default

Offline dhayzon

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
  • http://dhayzon.com/
    • wWw.club-dhayzone.net
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #7 on: May 04, 2014, 07:15:51 PM »
 creo q esta facil de hacer  :D  las visitas son puros bots   :thumbsdown:

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #8 on: May 05, 2014, 10:41:58 AM »
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.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #9 on: May 07, 2014, 12:00:20 PM »
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
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #10 on: May 08, 2014, 07:27:36 AM »
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
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #11 on: May 08, 2014, 02:06:08 PM »
is true AngelinaBelle, thanks for the tip
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #12 on: May 08, 2014, 04:35:57 PM »
I hope it is good advice, and you are able to make your customization very soon.

Saludos!
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #13 on: May 08, 2014, 04:47:12 PM »
esto lo estamos esperando muchos usuarios de simpleportal por eso hay muchas visitas a este post, ojalá alguien se anime a ayudarnos
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #14 on: May 08, 2014, 04:58:17 PM »
In the meantime, please contact the author of "like button" mod for advice.  This will help.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #15 on: May 18, 2014, 12:01:02 AM »
help please
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #16 on: May 19, 2014, 11:20:29 AM »
Of course! What did the author of your "like button" mod tell you?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #17 on: May 19, 2014, 03:48:02 PM »
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #18 on: May 20, 2014, 01:36:07 PM »
Did you ask for information on how to add the button to custom templates?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #19 on: May 20, 2014, 01:52:30 PM »
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?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #20 on: May 20, 2014, 03:44:12 PM »
like the topic, thanks AB  :-[
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #21 on: May 20, 2014, 03:58:44 PM »
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? 
Code: (find) [Select]
foreach ($return as $news)
Code: (replace) [Select]
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:


Code: [Select]
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.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline fapencio

  • Jr. Member
  • **
  • Posts: 61
  • Gender: Male
    • medilibros
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: Poner botones sociales en block "board news"
« Reply #22 on: May 20, 2014, 05:13:20 PM »
before of miniavatar please AB
Theme: Default

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Poner botones sociales en block "board news"
« Reply #23 on: May 22, 2014, 11:04:29 AM »
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.
Code: (find) [Select]
         if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
Code: (replace) [Select]
        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)
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?