. .
pragmaMx Support Forum 26 Mai 2012, 00:51:20 *
Willkommen Gast. Bitte einloggen oder registrieren.


Einloggen mit Benutzername und Passwort
News:
Brauchen Sie Hilfe? Bitte nutzen Sie unsere Suchfunktion bevor Sie Beiträge oder Fragen ins Board schreiben! Viele Fragen wurden bereits gestellt und beantwortet. Danke!
 
Übersicht Hilfe Forenregeln / Boardrules
 
Suche
Seiten: [1]   Nach unten
Drucken
Autor Thema: [gelöst] How display blocs on spefic pages ?  (Gelesen 4335 mal)
0 Mitglieder und 2 Gäste betrachten dieses Thema.
shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« am: 08 Juni 2011, 16:35:55 »

  Hello @ all PragmaMx.org community.

I come today because i don't found the syntax for display blocks on specifics pages.

exemple : i want my block display only the page mywebsite.net/Discussions-topic-883.html

I thinks this possible to do this with PragmaMx ?

A Topic is open on PragmaMx.fr but not solution was found at this day.

http://www.pragmamx.fr/Forum-topic-3213.html

 Can you help us ?

Thanks for your support and for this great cms  thumbup

Regards,

shorty
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #1 am: 11 Juni 2011, 07:45:09 »

 It's not possible ?   gruebel
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #2 am: 15 Juni 2011, 02:42:14 »

 puzzled please help me.  puzzled
I was think it's simple  mad2

Thanks for your support  drinks
Gespeichert

Baldyman
Moderator
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 1.236

Baldyman


WWW
« Antworten #3 am: 15 Juni 2011, 09:52:26 »

Hi shorty  bye

I tried a few things ... this one seems to work  biggrin
Create a new block with the following lines ...

Code: [Select]  
<?php

defined
('mxMainFileLoaded') or die('access denied');

// set module name and topic number
if (!defined('MX_MODULE') || MX_MODULE == 'Forum' && $_REQUEST['topic'] == 1) { 
$content  '<div align="center">This is a test ;-)</div>';
}

?>

You only have to change the module name and the topic number.
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #4 am: 15 Juni 2011, 15:58:45 »

 Thanks very much for your help  biggrin
i will try that, it's it works that will help me a lot !  thumbup

But it's not the real solution, how i can do if my the name of my page is not a number, or if the page is not a module who accept this syntax ?
I think the best solution is the syntax who integrate url of the page for dipslay a bloc.
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #5 am: 15 Juni 2011, 20:08:28 »

re  smile
 I tried to put this bloc in a forum categ but it's not works.
This the code i've tried :
Code: [Select]  
<?php

defined
('mxMainFileLoaded') or die('access denied');

// set module name and topic number
if (!defined('MX_MODULE') || MX_MODULE == 'Forum' && $_REQUEST['cat'] == 81) { 
$content  '<div align="center">Alsace ;-)</div>';
}

?>
Gespeichert

Baldyman
Moderator
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 1.236

Baldyman


WWW
« Antworten #6 am: 15 Juni 2011, 20:14:33 »

Hi shorty  bye

With your example

... exemple : i want my block display only the page mywebsite.net/Discussions-topic-883.html
...

it should work with that  gruebel

Code: [Select]  
<?php

defined
('mxMainFileLoaded') or die('access denied');

// set module name and topic number
if (!defined('MX_MODULE') || MX_MODULE == 'Discussions' && $_REQUEST['topic'] == 81) { 
$content  '<div align="center">This is a test ;-)</div>';
}

?>
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #7 am: 15 Juni 2011, 21:39:20 »

 Yes it's works great  !   thumbup

http://www.tradezone.fr/Discussions-topic-81.html

but it's work for a topic, and i want it works for a section or a board.

I wanna do that with this exemple : http://www.tradezone.fr/Discussions-cat-International-14.html

Code: [Select]  
<?php

defined
('mxMainFileLoaded') or die('access denied');

// set module name and topic number
if (!defined('MX_MODULE') || MX_MODULE == 'Discussions' && $_REQUEST['cat'] == 14) { 
$content  '<div align="center">This is a test ;-)</div>';
}

?>

and that not work  gruebel
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #8 am: 12 Juli 2011, 00:12:24 »

 You think no solution exist ?  puzzled
Please help me Cry
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #9 am: 15 Juli 2011, 01:47:17 »

hope we will turn on this light >>  Kristallkugel and found solution  cool.gif
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #10 am: 03 Januar 2012, 15:52:56 »

Hello @ all community
 It's ok for me now  biggrin.
for display blocs on specific smf bords, we can use this syntax.
now i think it's possible to adapt this syntax for display blocs on differents modules
Code: [Select]  
<?php
/**
 * This file is part of 
 * pragmaMx - Web Content Management System.
 * Copyright by pragmaMx Developer Team - http://www.pragmamx.org
 *
 * pragmaMx is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * $Revision: 1.5 $
 * $Author: tora60 $
 * $Date: 2007/12/22 14:15:56 $
 */

defined('mxMainFileLoaded') or die('access denied');

// set module name and topic number
if (!defined('MX_MODULE') || MX_MODULE == 'Forum' && $_REQUEST['board'] == 3

$mxblockcache false;

if (
mxIsUser()) {
    
$content 'test block';
    
}

else { 
$content 'Test block for guests'; }

?>
« Letzte Änderung: 03 Januar 2012, 16:06:56 von shorty » Gespeichert

Seiten: [1]   Nach oben
Drucken
 
Gehe zu:  

Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
design by hENNE, layout based on YAML