Ver Mensaje Individual
  #5 (permalink)  
Antiguo 03/08/2011, 05:26
jeremiselxi
(Desactivado)
 
Fecha de Ingreso: septiembre-2008
Mensajes: 269
Antigüedad: 15 años, 8 meses
Puntos: 22
Respuesta: como unir una vista con el modulo profile

hola MarioAraque. Disculpa que no habia entrado, pero ya lo resolvi. Como uni una vista con de un tipo de contenido creado con cck y el modulo profile?

Lo resolvi de esta manera.

Cree con el modulo profile un link como esta en la imagen



pero que tenga el checkmax. Visible en el formulario de registro de usuarios.

cree luego un tipo de contenido y en Opciones del formulario de envío

le puse Codigo en el titulo y comentario en el cuerpo

aqui esta una imagen




luego cree mi vista



pero lo importante esta en los Filtros la opcion

Nodo: Título porque la di a la opcion expose,



luego copie del tema Bluemarine

el page.tpl.php

y cree un prueba.info

Código:
name = Prueba 

description = probando uso

version = 1.0

core = 6.x

base theme = bluemarine

stylesheets[all][] = prueba.css



scripts[] = imprimir.js

scripts[] = a/jquery.js

scripts[] = a/jquery-ui.js

stylesheets[all][] = a/jquery-ui.css
y el tpl tiene este codigo
Código:
<?php
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">

<head>
  <?php print $head ?>
  <title><?php print $head_title ?></title>
  <?php print $styles ?>
  <?php print $scripts ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyle Content in IE */ ?> </script>
 
 <link type="text/css" href="a/jquery-ui.css" rel="stylesheet">    
  <script type="text/javascript" src="a/jquery.js"></script>
  <script type="text/javascript" src="a/jquery-ui.js"></script>
  <script type="text/javascript">
      $(document).ready(function() {
$("#edit-field-telefono-value").val("");
$("#edit-submit-vista").val("Buscar");
          $('#txtFechaSimple').datepicker();
          $('#edit-field-cita-0-value').datepicker();
$("#edit-field-telefono-value").val("");

//en la pagina /?q=admin/user/user/create


//ponermos el campo excusas disabled
$("#edit-profile-excusas").attr("disabled","disabled");

//hacemos que cuando dijitemos el username se escriba tambien en un campo que cree con profile, un campo link.
$("#edit-name").keyup(function () {
var elem = $("#edit-name").val();
$("#edit-profile-excusas").val("http://localhost/slide/?q=buscarexcusa&user=" + elem);
});



$("#edit-submit").click(function (evento) {
 
if ($("#edit-submit").attr("value","Crear nueva cuenta")=="Crear nueva cuenta")
evento.preventDefault();
$("#edit-profile-excusas").attr("disabled","");
$("#user-register").submit();



});




      });
  </script>       




</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" id="header">
  <tr>
    <td id="logo">
      <?php if ($logo) { ?><a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><img src="<?php print $logo ?>" alt="<?php print t('Home') ?>" /></a><?php } ?>
      <?php if ($site_name) { ?><h1 class='site-name'><a href="<?php print $front_page ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a></h1><?php } ?>
      <?php if ($site_slogan) { ?><div class='site-slogan'><?php print $site_slogan ?></div><?php } ?>
    </td>
    <td id="menu">
      <?php if (isset($secondary_links)) { ?><?php print theme('links', $secondary_links, array('class' => 'links', 'id' => 'subnavlist')) ?><?php } ?>
      <?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist')) ?><?php } ?>
      <?php print $search_box ?>
    </td>
  </tr>
  <tr>
    <td colspan="2"><div><?php print $header ?></div></td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" id="content">
  <tr>
    <?php if ($left) { ?><td id="sidebar-left">
      <?php print $left ?>
    </td><?php } ?>
    <td valign="top">
      <?php if ($mission) { ?><div id="mission"><?php print $mission ?></div><?php } ?>


<div id="printer-button"><a
href="javascript:PrinterTool.print('main')">
Imprimir</a><br>

   
</div>

      <div id="main">
        <?php print $breadcrumb ?>
        <h1 class="title"><?php print $title ?></h1>
        <div class="tabs"><?php print $tabs ?></div>
        <?php if ($show_messages) { print $messages; } ?>
        <?php print $help ?>
        <?php print $content; ?>
        <?php print $feed_icons; ?>
      </div>
    </td>
    <?php if ($right) { ?><td id="sidebar-right">
      <?php print $right ?>
    </td><?php } ?>
  </tr>
</table>

<div id="footer">
  <?php print $footer_message ?>
  <?php print $footer ?>
</div>
<?php print $closure ?>
</body>
</html>
de lo cual lo mas importante es esto

Código PHP:
<link type="text/css" href="a/jquery-ui.css" rel="stylesheet">    
  <
script type="text/javascript" src="a/jquery.js"></script>
  <script type="text/javascript" src="a/jquery-ui.js"></script>
  <script type="text/javascript">
      $(document).ready(function() {
$("#edit-field-telefono-value").val("");
$("#edit-submit-vista").val("Buscar");
          $('#txtFechaSimple').datepicker();
          $('#edit-field-cita-0-value').datepicker();
$("#edit-field-telefono-value").val("");

//en la pagina /?q=admin/user/user/create


//ponermos el campo excusas disabled
$("#edit-profile-excusas").attr("disabled","disabled");

//hacemos que cuando dijitemos el username se escriba tambien en un campo que cree con profile, un campo link.
$("#edit-name").keyup(function () {
var elem = $("#edit-name").val();
$("#edit-profile-excusas").val("http://localhost/slide/?q=buscarexcusa&user=" + elem);
});

$("#edit-submit").click(function (evento) {
 
if ($("#edit-submit").attr("value","Crear nueva cuenta")=="Crear nueva cuenta")
evento.preventDefault();
$("#edit-profile-excusas").attr("disabled","");
$("#user-register").submit();

});

      });
  </script> 
use codigo jquery paga algunas cosas como por ejemplo cuando se escriba en el campo usuario se agrege al edit del profile con keyup

luego lo puse disabled porque no quiero que nadie cambie ese valor.


por ultimo si buscas el usuario veras que te aparecera el link
de esta manera
http://localhost/slide/?q=buscarexcusa&user=xxx
donde xxx es el username y cuando le das te busca en la vista
Espero esto le sirva a alguien que lo necesita.