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: 314
  • 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]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: No puedo agregar paginas PHP  (Read 3278 times)

0 Members and 1 Guest are viewing this topic.

Offline aportadordelmix

  • Semi Newbie
  • *
  • Posts: 19
  • SMF Version: 2 RC4
  • SP Version: 2.3
No puedo agregar paginas PHP
« on: March 20, 2011, 09:17:04 AM »
Hola!

Les cuento mi problema, tengo instalado la versión de simpleportal 2.3.2 manualmente, usando el parse http://custom.simplemachines.org/mods/index.php?action=parse;mod=1104;attach=139821;smf_version=2.0_RC4 Pero resulta que cuando quiero agregar una pagina PHP, por ejemplo esta:

Code: [Select]
<?php

  
global $txt$scripturl$user_info;
   global 
$context$modSettings$id_member;
   global 
$board_info$settings$db_prefix$smcFunc;

/////////////////////////////////////////////////////////////////  Enter the desired groups
   
$groups_list = array(1,2);
/////////////////////////////////////////////////////////////////
   
$groups_query1 'mem.id_group IN ({array_int:groups1})';
   
$groups_query2 '';
//   $groups_query2 = ' OR FIND_IN_SET(' . implode(', mem.additionalGroups) OR FIND_IN_SET(', $groups_list) . ', mem.additionalGroups)';



          
echo '<table align="center" width="95%" cellpadding="0" cellspacing="0"><tr>
                <td style="border-bottom: 2px solid #282828; padding-bottom: 2px; "><h2>Our Team</h2>
      <span class="middletext">These are the people you will run into while visiting bluedevilcustoms.com</span><br /><br />
      </td></tr></table>'
;


   
$loaded_ids = array();
    
$user_profile=array();
    
$memberContext=array();
    
$profile=array();
    
$context['team']=array();

   
// Load the member's data.
      
$request $smcFunc['db_query']('''
         SELECT IFNULL(lo.log_Time, 0) AS is_online, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type,
            mem.personal_text, mem.avatar, mem.id_member, mem.member_name, mem.real_name , mem.last_login, mem.website_title,
            mem.website_url, mem.location, mem.posts, them.value AS teamtext, g.group_name
         FROM {db_prefix}members AS mem
            INNER JOIN {db_prefix}membergroups AS g ON (mem.id_group = g.id_group)
            LEFT JOIN {db_prefix}log_online AS lo ON (lo.id_member = mem.id_member)
            LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)
            LEFT JOIN {db_prefix}themes AS them ON (mem.id_member = them.id_member AND them.variable = {string:theme_var} AND them.ID_THEME=1)
         WHERE (' 
$groups_query1 $groups_query2 ')
         ORDER BY mem.posts DESC'
,
         array(
             
'groups1' => $groups_list,
             
'theme_var' => 'teamtext',
         )
   );
   
$new_loaded_ids = array();
   while (
$row mysql_fetch_assoc($request))
   {

         
$avatar_width '';
         
$avatar_height '';

      
$context['team'][] = array(
      
'username' => $row['member_name'],
      
'name' => $row['real_name'],
      
'groupname' => $row['group_name'],
      
'posts' => $row['posts'],
      
'location' => $row['location'],
      
'href' => $scripturl '?action=profile;u=' $row['id_member'],
      
'link' => '<a href="' $scripturl '?action=profile;u=' $row['id_member'] . '" title="' $txt['profile_of'] . ' ' $row['real_name'] . '">' $row['real_name'] . '</a>',
      
'blurb' => $row['personal_text'],
      
'avatar' => array(
         
'name' => $row['avatar'],
         
'image' => $row['avatar'] == '' ? ($row['id_attach'] > '<img  src="' . (empty($row['attachment_type']) ? $scripturl '?action=dlattach;attach=' $row['id_attach'] . ';type=avatar' $modSettings['custom_avatar_url'] . '/' $row['filename']) . '" alt="" class="avatar2" border="0" />' '') : (stristr($row['avatar'], 'http://') ? '<img src="' $row['avatar'] . '"' $avatar_width $avatar_height ' alt="" class="avatar2" border="0" />' '<img src="' $modSettings['avatar_url'] . '/' htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
         
'href' => $row['avatar'] == '' ? ($row['id_attach'] > ? (empty($row['attachmentType']) ? $scripturl '?action=dlattach;attach=' $row['id_attach'] . ';type=avatar' $modSettings['custom_avatar_url'] . '/' $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' $row['avatar']),
         
'url' => $row['avatar'] == '' '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' $row['avatar'])
      ),
      
'last_login' => empty($row['last_login']) ? $txt['never'] : timeformat($row['last_login']),
      
'last_login_timestamp' => empty($row['last_login']) ? forum_time(0$row['last_login']),
      
'website' => array(
         
'title' => $row['website_title'],
         
'url' => $row['website_url']),
      
'online' => array(
         
'is_online' => $row['is_online'],
         
'text' => &$txt[$row['is_online'] ? 'online' 'offline'],
         
'image_href' => $settings['images_url'] . '/' . ($row['is_online'] ? 'useron' 'useroff') . '.gif',
      ),
      
'teamtext' => $row['teamtext'],
   );


   }
   
mysql_free_result($request);

   echo 
'<table align="center" width="95%" cellpadding="5" cellspacing="5" style="margin-top: 10px;"><tr>';

    
$newrow=0;
   foreach(
$context['team'] as $team)
        {
            echo 
'
<td valign="top" align="right" width="5%">'
.$team['avatar']['image'].'</td>
<td valign="top" width="45%" class="windowbg3 team" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;">'
.$team['link'].'</h2>
<b>Position</b>: '
.$team['groupname'].'<br />
<b>Last seen</b>: '
.$team['last_login'].'<br />
<b>Posts</b>: '
.$team['posts'].'<br />
, !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' '' '
, !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' '' '
,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' $team['online']['text'].'<br />' '

, !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' '' '

,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' '' '

    </div></td>'
;
            
$newrow++;
            if(
$newrow>1){
               
$newrow=0;
               echo 
'</tr><tr><td colspan="4"><br /><br /> </td></tr><tr>';
            }
        }
   echo 
'</tr></table>'

?>
   
La agrego sin la apertura <?php ni el cierre ?> de PHP.

No entiendo cual puede ser el motivo de que no me deja agregar, pero si puedo previzualizar código.


Paginas HTML Y BBC, Si puedo agregar sin problemas, pero en PHP me sale el siguiente error:

Code: [Select]
¡Un error ha ocurrido!
Hay un error de sintaxis en el código del bloque. Por favor, revisa el código.

En localhost lo probé al código y funciona perfecto.

Qué puede ser el motivo o la causa?

DATOS:
WWW.APORTESYDESCARGAS.COM.AR
THEME DEFAULT
2.0 RC54

Offline aportadordelmix

  • Semi Newbie
  • *
  • Posts: 19
  • SMF Version: 2 RC4
  • SP Version: 2.3
Re: No puedo agregar paginas PHP
« Reply #1 on: March 20, 2011, 09:16:23 PM »
Qué significa el quote?

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: No puedo agregar paginas PHP
« Reply #2 on: March 21, 2011, 10:49:29 AM »
es es exactamente lo que quieres hacer o que e so que se supone que hace esa página?

no hay ningun error, debería de aparecer tu página de staff sin problemas, ten en cuenta que ese cogido solo va a funcionar en un foro 2.0

Offline aportadordelmix

  • Semi Newbie
  • *
  • Posts: 19
  • SMF Version: 2 RC4
  • SP Version: 2.3
Re: No puedo agregar paginas PHP
« Reply #3 on: March 21, 2011, 11:03:55 AM »
es es exactamente lo que quieres hacer o que e so que se supone que hace esa página?

no hay ningun error, debería de aparecer tu página de staff sin problemas, ten en cuenta que ese cogido solo va a funcionar en un foro 2.0

Es código agrega una lista del equipo de trabajo de mi foro. Como se ve aquí http://www.simplemachines.org/about/team.php

No entiendo porque no me funciona en mi foro, es la versión 2.0 RC5.

Puede ser qué falta algún código? Porque la instalación del mod SP lo hice manualmente.

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: No puedo agregar paginas PHP
« Reply #4 on: March 21, 2011, 12:32:05 PM »
puedes lograr el mismo resultado sin tener que usar todo ese codigo, SSI.php tiene una funcion para llamar a grupos de usaurios en especifico,  ve ssi_examples.php  en tu foro

Offline aportadordelmix

  • Semi Newbie
  • *
  • Posts: 19
  • SMF Version: 2 RC4
  • SP Version: 2.3
Re: No puedo agregar paginas PHP
« Reply #5 on: March 21, 2011, 12:37:24 PM »
puedes lograr el mismo resultado sin tener que usar todo ese codigo, SSI.php tiene una funcion para llamar a grupos de usaurios en especifico,  ve ssi_examples.php  en tu foro
No sabía eso. Cómo sería?

Hay una opción de bloques. Pero yo lo quiero como una pagina.
« Last Edit: March 21, 2011, 12:42:29 PM by aportadordelmix »

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: No puedo agregar paginas PHP
« Reply #6 on: March 22, 2011, 11:20:57 AM »
revisa tu ssi_examples.php

<?php ssi_fetchGroupMembers($groupIDs); ?>

donde $groupIDs  son los ID o el ID de ls grupos que deseas mostrar