collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 243
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {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

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: ¿Como agregar un icono alado del post del bloque recent topic?  (Read 8770 times)

0 Members and 2 Guests are viewing this topic.

Offline josegs94

  • Semi Newbie
  • *
  • Posts: 14
    • Fanate!
  • SMF Version: 1.1.10
  • SP Version: 2.3
¿Como agregar un icono alado del post del bloque recent topic?
« on: December 24, 2009, 01:03:00 PM »
Hola, tengo instalado mi SMF 1.1.11 y Simple Portal 2.3.1 en mi web: http://fanate.freei.me/ y quiero que en mi bloque recent_topics, es el bloque en donde estan todos los topics, quiero que alado del link del topic o post, en ves de que aparesca esta imagen deseo que aparesca la imagen del foro en que se publico el topic.. pero ustedes diran como si en cada foro la imagen es la misma.. pasa que instale el mod cbi v0.5 (Custom Board Icons) que te permite cambiar la imagen de cada foro.. y yo lo tengo asi y quiero que cuando se postee en animaciones flash, aladodel topic del bloque recent post aparesca el icono del foro osea este y cuadndo postee en Computadoras, alado del topic en el bloque recnt topics quiero que aparesca este icono   espero que se haya entendido.. y que me puedan ayudar!




Recordemos que el bloque recent topics lo encontramos en /Sources/PortalBlocks.php  y aca esta el codigo de como aprecen los topics


Quote
   elseif ($display == 'full')
   {
      echo '
                        <table class="sp_fullwidth">';

      foreach ($items as $item)
         echo '
                           <tr>
                              <td class="sp_recent_icon sp_center">
                                 ', sp_embed_image(empty($parameters['type']) ? 'post' : 'topic'), '
                              </td>
                              <td class="sp_recent_subject">
                                 <a href="', $item['href'], '">', $item['subject'], '</a>
                                 ', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '<br />[', $item['board']['link'], ']
                              </td>
                              <td class="sp_recent_info sp_right">
                                 ', $item['poster']['link'], '<br />', $item['time'], '
                              </td>
                           </tr>';

      echo '
                        </table>';
   }




Desde Ya Muchas Gracias y Felices Fiestas! que la pasen de 10.. y que simle portal cresca mucho mas en el año proximo ;)
« Last Edit: December 24, 2009, 01:24:26 PM by josegs94 »

Offline josegs94

  • Semi Newbie
  • *
  • Posts: 14
    • Fanate!
  • SMF Version: 1.1.10
  • SP Version: 2.3
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #1 on: December 25, 2009, 07:02:06 PM »
ayuda!

Feliz Navidad

Offline shadow_dweller

  • Semi Newbie
  • *
  • Posts: 27
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #2 on: December 29, 2009, 03:21:04 PM »
hola amigo parese que en el foro simplemachines ya te respondiero la pregunta
aqui el link http://www.simplemachines.org/community/index.php?topic=355863.0
en el manual del Custom Board Icon en mi caso a la extencion gif la cambie por png
y yo lla lo prove y funciona tambien le ise unas modificasiones de mi parte para que se viera asi 



aqui te dejo el codigo que utilise sacandole algunas cosas del codigo oringinal del  El Player

Quote
elseif ($display == 'full')
   {
      echo '
                        <table class="sp_fullwidth">';

      foreach ($items as $item)
         echo '
                           <tr>
                              <td class="sp_recent_icon sp_center">
                               <img src="'.$settings['theme_url']. '/icons/' . $item ['board']['id'] . '/on.png" width="36" height="36" >
                              </td>
                              <td class="sp_recent_subject">
                                 <a href="', $item['href'], '">', $item['subject'], '</a>
                                 ', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['language'] . '/new.png" alt="' . $txt[302] . '" border="0" /></a>', '<br />
                              </td>
                              <td class="sp_recent_info sp_right">
                                 ', $item['poster']['link'], '<br />','
                              </td>
                           </tr>';

      echo '
                        </table>';
   }

en este caso lo hice con imagenes en con extecion png pero tu lo puedes hacer con otra cambiandole la estencion en el codigo

tambien esperando que nuestro amigo 130860 le eche un ojo para que lo revise

pd: para sacar el nombre de la persona que posteo quita esta parte tal cual te indico
Code: [Select]
$item['poster']['link'],
« Last Edit: December 29, 2009, 03:27:53 PM by shadowdwel »

Offline maipgeut

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 1.1.11
  • SP Version: 2.3
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #3 on: December 31, 2009, 03:31:37 AM »
buenisimo me resulto, me quedo asi el codigo, queria colocar solo el tema que se posteo y el icono de donde venia posteado ese tema

Code: [Select]
elseif ($display == 'full')

{

echo '

<table class="sp_fullwidth">';



foreach ($items as $item)

echo '

                           <tr>
                              <td class="sp_recent_icon sp_center">
                               <img src="'.$settings['theme_url']. '/icons/' . $item ['board']['id'] . '/on.png" width="20" height="20" >
                              </td>                              <td class="sp_recent_subject">
                                 <a href="', $item['href'], '">', $item['subject'], '</a>
                                 ', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '<br />
                              </td>
                           </tr>';


ahora falta como colocar fijos algunos temas, vamos a ver como se hace, si lo averiguo lo posteo y si ya esta la solucion, ojala alguien lo pueda postear
saludos

Offline DaRKeN

  • Jr. Member
  • **
  • Posts: 50
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #4 on: April 24, 2010, 11:04:54 PM »
Y para que no te dirija al último mensaje del foro? :S

Offline Morell

  • Semi Newbie
  • *
  • Posts: 15
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #5 on: May 21, 2010, 01:48:35 PM »
A mi también me interesaría esta ultima cosa, que no mostrara el ultimo mensaje...

Offline alex1215

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 1.1.11
  • SP Version: 2.3
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #6 on: May 25, 2010, 11:44:25 PM »
Y para que no te dirija al último mensaje del foro? :S

Idem

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #7 on: May 28, 2010, 11:08:50 AM »

para que el enlace vaya a el primer mensaje

encuentra esto:

 
Code: [Select]
$item['href']
y reemplazalo con esto:

Code: [Select]
  $scripturl . '?topic='. $item['topic']. '.0'
 




Offline Succubus Evaligan

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • yes, Yuri for girls ^.^
    • Yurilandia
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #8 on: June 05, 2010, 09:48:25 PM »
Por cierto, falto ponerle en el
Code: [Select]
<img src="'.$settings['theme_url']. '/icons/' . $item ['board']['id'] . '/on.png" width="20" height="20" >

El atributo ALT y cerrarlo con una "/" antes del final, ya que si no rompe la validación XHTML. También es mejor dejar el icono del board sin un tamaño fijo o con otro tamaño dependiendo de los gustos de cada quien, ya que no a todas las personas les gustara poner imágenes de 20x20 pixeles.

Code: [Select]
<img src="'.$settings['theme_url']. '/icons/' . $item ['board']['id'] . '/on.png" alt="" />

Por cierto reporto un muy pequeñisimo e insignificante error de validación XHTML.
En el bloque de selección del theme en el portal, les falto en la línea que dice:
Code: [Select]
<form method="post">
agregar...
Code: [Select]
<form method="post" action="">
y con eso ya queda como XHTML válido.

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #9 on: June 06, 2010, 06:31:24 PM »
gracias por reportarlo ;)

Offline Froxnet

  • Semi Newbie
  • *
  • Posts: 5
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: ¿Como agregar un icono alado del post del bloque recent topic?
« Reply #10 on: October 09, 2011, 01:59:19 PM »
hola amigo parese que en el foro simplemachines ya te respondiero la pregunta
aqui el link http://www.simplemachines.org/community/index.php?topic=355863.0
en el manual del Custom Board Icon en mi caso a la extencion gif la cambie por png
y yo lla lo prove y funciona tambien le ise unas modificasiones de mi parte para que se viera asi 



aqui te dejo el codigo que utilise sacandole algunas cosas del codigo oringinal del  El Player

Quote
elseif ($display == 'full')
   {
      echo '
                        <table class="sp_fullwidth">';

      foreach ($items as $item)
         echo '
                           <tr>
                              <td class="sp_recent_icon sp_center">
                               <img src="'.$settings['theme_url']. '/icons/' . $item ['board']['id'] . '/on.png" width="36" height="36" >
                              </td>
                              <td class="sp_recent_subject">
                                 <a href="', $item['href'], '">', $item['subject'], '</a>
                                 ', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['language'] . '/new.png" alt="' . $txt[302] . '" border="0" /></a>', '<br />
                              </td>
                              <td class="sp_recent_info sp_right">
                                 ', $item['poster']['link'], '<br />','
                              </td>
                           </tr>';

      echo '
                        </table>';
   }

en este caso lo hice con imagenes en con extecion png pero tu lo puedes hacer con otra cambiandole la estencion en el codigo

tambien esperando que nuestro amigo 130860 le eche un ojo para que lo revise

pd: para sacar el nombre de la persona que posteo quita esta parte tal cual te indico
Code: [Select]
$item['poster']['link'],
Podrias pasar tu SP Modificado asi como lo tienes en la imagen?