BIF3
[ class tree: BIF3 ] [ index: BIF3 ] [ all elements ]
Prev Next
MySQL Links

MyLinks es un widget que genera un listado de links basado en una consulta MySQL, tambien posee un IDM para su administracion.

Para la inclucin del mismo en un archivo .bif
<MyLinks QUERY="SELECT * FROM links WHERE habilitado=1"/>
Para utilizarlo en PHP directo.
$links = & new MyLinks(array('QUERY'=>'SELECT * FROM links WHERE habilitado=1'));
La tabla MySQL
DROP TABLE IF EXISTS links;
CREATE TABLE links (
  nombre varchar(100) NOT NULL default '',
  url varchar(100) NOT NULL default '',
  descripcion varchar(255) NOT NULL,
  id int(4) NOT NULL auto_increment,
  habilitado tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

Para la administracion del mismo existe un IDM, IDM_links. Dentro de mapping.txt tiene que ir esto.
a_links:IDM_links(insert)
m_links:IDM_links(modify)
Para incluir el IDM en un .bif tiene que ir
<BifContainer WidgetAccess="username = admin">
<BifInclude SRC="component://a_links" />
<BifInclude SRC="component://m_links" />
</BifContainer>
Como se ve, hay un parametro o atributo extra en el tag BifContainer, que es WidgetAcces, el cual indica que solo en usuario admin puede ver lo que hay dentro de BifContainer, o sea el IDM_links. Otra posibilidad en vez de usar username, es tambien el parametro keys, o level.

Comentarios, preguntas email(linuxvarela_at_yahoo.com.ar).

Prev   Next
BIF Installation guide Using the SimpleWiki component

Documentation generated on Wed, 10 Nov 2004 19:41:19 -0300 by phpDocumentor 1.2.3