21
fo-fo
Re: global variables
  • 2005/5/1 11:53

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


it's basically the smarty variables a module uses and I'd wanted these to be interpreted by an other module.



22
fo-fo
Re: Data extractor
  • 2005/5/1 10:33

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


for developers scripts to look into:

php.myedit
php.buns
php.lens
php.report.class



23
fo-fo
Re: Data extractor
  • 2005/5/1 9:39

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


maybe the no-ah module does that, I have yet to try it out



24
fo-fo
global variables
  • 2005/4/30 8:05

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


how can be a module smarty made global?



25
fo-fo
Data extractor
  • 2005/4/30 7:49

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


a module that can extract numerical data from the database using multiple extraction methods (join... etc.) and can associate the extracted data with smarty-tags maybe to be transportable to different parts of XOOPS and enabled to add them up, deduce, multiply... would be fantastic.



26
fo-fo
UserPoints
  • 2005/4/29 14:05

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


is it possible to display points associated with this module in a block (not custom)?

I'm using the module with WFSection and would need to know the smarty tag of points for submitted articles. I already tried $score, $comst, $totalpnts...

I know there are points given 'cause TopMembers (the UserPoints module) shows the users and their points.

maybe the syntax is wrong - it just shows the username and nothing else.
the block template looks like this (maybe the syntax is wrong - it just shows the username and nothing else):

<table cellspacing="1" class="outer">
<{foreach item=user from=$block.users}>
<tr class="<{cycle values="even,odd"}>" valign="middle">
<td align="center">
<a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>
</td>
<td align="center"><{$totalpnts}></a>
</tr>
<{/foreach}>
</table>



27
fo-fo
Re: displaying sql query results
  • 2005/4/21 22:00

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


my syntax is wrong or is this some kinda impossible thing.

I couldn't get results with it.

the edited block template looks like this -

<table cellspacing="1" class="outer">
<{foreach item=user from=$block.users}>
<tr class="<{cycle values="even,odd"}>" valign="middle">
<td align="center">
<a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>
</td>
<td align="center">
<?
mysql_connect("localhost", name, password);
$result = mysql(mydatabase, "SELECT quan FROM points WHERE
players.id=points.player_id AND <{$xoops_uname}>=players.first_name");
echo $result;
?>
</td>
</tr>
<{/foreach}>
</table>



the sql tables look like this -

players:
first_name...id
xxx..........1

points:
player_id....quan
1............100

so the result shoud be 100
where is the flaw?



28
fo-fo
displaying sql query results
  • 2005/4/21 16:04

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


in a block... how can I do that?

I would need to display a value associated with the logged-in user, yet the query username is different. so the second question is where to put the <{$xoops_uname}> tag to get relevant results?

thanks.

I guess this script queries the database

<?php
//connect to server with username and password
$connection = mysql_connect ("localhost","username", "password") or die ("Cannot make the connection");
//connect to database
$db = mysql_select_db ("test",$connection) or die ("Cannot connect to database");
//our SQL query
$sql_query = "SELECT * FROM test LIMIT 1";
//store the SQL query in the result variable
$result = mysql_query($sql_query);
if(mysql_num_rows($result))
{
//output as long as there are still available fields
while($row = mysql_fetch_row($result))
{
echo ("<a href=\"$row[2]\">$row[3]</a>");
echo (": $row[4]<br>");
}
}
//if no fields exist
else
{
echo "no values in the database";
}

?>



29
fo-fo
Re: <{$xoops_uname?
  • 2005/4/20 13:33

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


okay, I managed to do it like this. not too smart, but it works.

1. cloned the default template set
2. cloned set is editable
3. changed in Preferences Main »» General Settings the Default template set to the cloned set



30
fo-fo
Re: <{$xoops_uname?
  • 2005/4/20 13:14

  • fo-fo

  • Just popping in

  • Posts: 34

  • Since: 2005/4/13


I've been thinking about this and I'd like to edit the New Members block to display <{$xoops_uname}> but couldn't do it with the 'Edit Template'.

why is that?




TopTop
« 1 2 (3) 4 »



Login

Who's Online

132 user(s) are online (76 user(s) are browsing Support Forums)


Members: 0


Guests: 132


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits