Seleccionar idioma:
Realizar Donación - Mods Premium - Portfolio



Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.
* PHP Code or something for Link Blocks on my site.
  Leído 2644 veces
* Viendo el foro
 0 Usuarios y 1 Visitante están viendo este foro.


Tema Solucionado
*
Jul 08 2011


Hi all, I am hoping to pick the brains of any website forums experts out there that might have the slightest idea of what I am talking about.

I have put a new portal (Adk Portal) on my website that everybody will see once they enter my site, now what I want to do is this.

I want to place "Blocks" where as a particular “block” will look at the Board link and then list all the posts inside as hyper linked shortcuts.

So when a visitor visits my website, the left hand block named: (Battlezone 2 Levels) would search the board URL (EG http://www.shaneward.net/index.php?board=18.0) and then list all the topics and then hyper link them so the user can click on the name inside the block and be directed straight to the topic

I also want it to be automatic so that if a new topic is added, it will be automatically included inside that block.

The code can be in HTML or php, but I have the feeling it will need to be a php code that can be inserted into the website Blocks section on my forum.

Hope someone can help or direct me to the code :)

Shane

2.0 RC3-3
SMF 1.1.14

Mensajes: 6

Ver Perfil 

En línea

*
Jul 08 2011


Hello What you want is a block with a single forum topics and adding new topics to the forum posts in the same block.

SmfPersonal Ex-Project maneger
#1

Mensajes: 3358

Ver Perfil  Email 

En línea

*
Jul 08 2011


yes, something like that, I am not a programmer or php coder, so hopefully someone can provide the code, I just update the correct links and insert into a new block...

Many thanks in advance
Shane

2.0 RC3-3
SMF 1.1.14
#2

Mensajes: 6

Ver Perfil 

En línea

*
Jul 08 2011


mmmm

Download this attachment.

Upload the file from the administration.

Replace the following:
$num_recent = 10; //Number of topics
$array = array(1); //Id Boards separated comma. Example (1,2,3)

*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#3

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea

*
Jul 08 2011


That seemed to work.. But needs some tweaking, is there any way to clean up this code so that only the Subject name is visible without the date, poster and all the other stuff, I only wanted the title, hyperlinked. Also, it seems to fail went reading a topic that had a date in it. But I think I can fix it.

2.0 RC3-3
SMF 1.1.14
#4

Mensajes: 6

Ver Perfil 

En línea

*
Jul 08 2011


Replace:
Código: [Seleccionar]
echo'
<td style="width: 50%;" class="'.$win.'">
<table style="width: 100%;"><tr>
<td>
<a href="'.$scripturl.'?topic='.$ID_TOPIC.'.0" title="'.$subject.'"><b>'.$subject.'</b></a>&nbsp;
', !$Output['is_new'] ?  '' : '<a href="' . $scripturl . '?topic=' . $Output['topic'] . '.msg' . $Output['new_from'] . ';topicseen#new" rel="nofollow"><img src="' . $settings['images_url'] . '/english/new.gif" alt="New" border="0" /></a>', '
<div style="float: right;">
<a href="'.$href_last.'">
<img alt="" src="'.$settings['images_url'].'/icons/last_post.gif" />
</a>
</div>
<br />
<span class="smalltext">Last updated: <a href="'.$scripturl.'?action=profile;u='.$id_member.'"><b>'.$MEMBER_STARTED.'</b></a>
&nbsp;-&nbsp;'.$posterTime.'</span>
</td></tr></table>
</td>';


With:
Código: [Seleccionar]
echo'
<td style="width: 50%;" class="'.$win.'">
<table style="width: 100%;"><tr>
<td>
<a href="'.$scripturl.'?topic='.$ID_TOPIC.'.0" title="'.$subject.'"><b>'.$subject.'</b></a>&nbsp;
</td></tr></table>
</td>';

*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#5

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea

*
Jul 08 2011


Bravo, thanks for the help, I took away the table because it was leaving a huge gap between the posts so I refined the code to this

Código: [Seleccionar]
echo'
<a href="'.$scripturl.'?topic='.$ID_TOPIC.'.0" title="'.$subject.'"><b>'.$subject.'</b></a>
';

Huge thanks ^HeRaCLeS^

2.0 RC3-3
SMF 1.1.14
#6

Mensajes: 6

Ver Perfil 

En línea

*
Jul 08 2011


Glad to help  ;)

*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#7

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea

*
Jul 08 2011


RRRRGGGGGGG... I knew it was too good to be true. For some reason, the two blocks, with the same code-but programmed for different boards-seem to be conflicting and the corrupt the entire portal up. I've disabled both of them, but there is too much stuff in there to clean all the unnecessary stuff prevent it from conflicting.

I get a message that says :

Fatal error: Cannot redeclare latesttopic() (previously declared in C:\www\web09\Sources\Subs-adkblocks.php(230) : eval()'d code:5) in C:\www\web09\Sources\Subs-adkblocks.php(230) : eval()'d code on line 166

That was after I re-used the code from the website, just in case I did something to brake it in my tweaking...

Shane

2.0 RC3-3
SMF 1.1.14
#8

Mensajes: 6

Ver Perfil 

En línea

*
Jul 08 2011


In the second file

Replace:
Código: [Seleccionar]
LatestTopic($num_recent);

function LatestTopic($num_recent)

With:
Código: [Seleccionar]
LatestTopic1($num_recent);

function LatestTopic1($num_recent)

*¤×•·:.·.:·•×¤* ^HeRaCLeS^ *¤×•·:.·.:·•×¤*
*¤×• Todos los Mp seran ignorados | Solo seran considerados los Mp Solicitados por mi •×¤*
*¤×• All Mp will be ignored | Only considers the Mp requested per my •×¤*

SMFPersonal

Adk Portal 3.0.2
2.0.14
www.smfpersonal.net
#9

Mensajes: 13978

Ver Perfil  SMFPersonal 

En línea




Otros temas de su interes

[SOLVED] Carrousel has no arrows to scroll libertygirl Noviembre 13, 2011, 11:40:46 am *
Redirect guest user to login or register page thekos Junio 20, 2011, 05:51:13 am *
Wanna ajdust stuff on d left menu?? born2fly Julio 18, 2012, 02:26:29 pm *
width of forum kepipro Julio 03, 2011, 10:06:50 pm
Login / Register box / text Mirko22 Enero 22, 2012, 03:51:57 pm *
Shoutbox - getting rid of timestamp sn00ze Febrero 28, 2012, 06:01:17 am



Usuario:
Contraseña:
Sesión:
hermes bracelet replica, christian louboutin replica, van cleef and arpels replica, red bottoms replica, cartier love bracelet replica christian louboutin replica, christian louboutin replica, hermes bracelet replica,