Page 1 of 1
how to change text in captcha code..
#1
Posted 27 April 2009 - 07:12 AM
How to change text in captcha code.. or make personally captcha in etomite ?
please help.
regard - pardi
please help.
regard - pardi
#2
Posted 27 April 2009 - 08:45 AM
Log into the manager, then click the configuration link - on one of the tabs in there is where you choose the captcha words..
#3
Posted 28 April 2009 - 03:14 AM
ok, thanks DeanC.. I didn't pay attention for the configuration link.. :D
I have any question, how to change captcha size..? I need captcha size smaller :blush:
I have any question, how to change captcha size..? I need captcha size smaller :blush:
#5
Posted 29 April 2009 - 08:36 AM
Hello, i want to ask again..
my snippet not work, and view i don't know why is happen..? i want to parse data and get record count.
this my snippet :
my chunk :
call in my template :
please help.. :)
my snippet not work, and view
Quote
Resource id #11 {/rs11} 2 {username}
this my snippet :
$etomite->rs1 = $etomite->getIntTableRows ( $fields="*", $from="active_users", $where="", $sort="", $dir="", $limit="", $push=false, $addPrefix=true ); $output = $etomite->parseChunk( "teknikku", array( 'rs11'=>$etomite->rs1 ) );
my chunk :
<?php global $etomite; $m = $etomite->recordCount($etomite->rs1); ?>
<table>
{rs11}
<tr>
<td>{username}</td>
</tr>
{/rs11}
<tr>
<?php echo $m;?>
</tr>
<?// here is where the $rs2 loop ends ?>
</table>call in my template :
[!teknikku!]
please help.. :)
#6
Posted 29 April 2009 - 12:54 PM
You are looking for $count = $etomite->recordCount($etomite->rs1); to get the record count of the query for a standard MySQL result set... You can also send the value in your parseChunk() call... But there is an easier way if you don't need an "active chunk" which requires embedded PHP...
The example code below should work... By getting and sending the $count in the parseChunk() call we can forego having to reference the $etomite object in the chunk itself... Switching $push=true allows us to send a multi-dimensional array in parseChunk() which doesn't support MySQL result set pointers in v1.1 but is planned for the v1.2 release...
Part of your problem is that you were trying to mix disparate data abstraction and parseChunk concepts... See my site for tutorials on the different methods which are referred to as templating for lack of another term at the time...
The example code below should work... By getting and sending the $count in the parseChunk() call we can forego having to reference the $etomite object in the chunk itself... Switching $push=true allows us to send a multi-dimensional array in parseChunk() which doesn't support MySQL result set pointers in v1.1 but is planned for the v1.2 release...
rs1 = $etomite->getIntTableRows ( $fields="*", $from="active_users", $where="", $sort="", $dir="", $limit="", $push=true, $addPrefix=true ); $count = count(rs1); $output = $etomite->parseChunk( "teknikku", array( 'rs11'=>$etomite->rs1, 'count'=>$count ) );
<table>
{rs11}
<tr>
<td>{username}</td>
</tr>
{/rs11}
<tr>
<td>{count}</td>
</tr>
</table>Part of your problem is that you were trying to mix disparate data abstraction and parseChunk concepts... See my site for tutorials on the different methods which are referred to as templating for lack of another term at the time...
#7
Posted 30 April 2009 - 02:34 AM
I still learn from your site ralph.. and another site tutorial about etomite. :)
i try your code, but count not same with total record in database? i have 2 record, why result count is 1..
i try your code, but count not same with total record in database? i have 2 record, why result count is 1..
rs1 = $etomite->getIntTableRows ( $fields="*", $from="active_users", $where="", $sort="", $dir="", $limit="", $push=true, $addPrefix=true ); $count = count(rs1); $output = $etomite->parseChunk( "teknikku", array( 'rs11'=>$etomite->rs1, 'count'=>$count ) );
<table>
{rs11}
<tr>
<td>{username}</td>
</tr>
{/rs11}
<tr>
<td>{count}</td>
</tr>
</table>
#8
Posted 30 April 2009 - 01:23 PM
Ok... We're talking about two totally different queries here... There are several methods to get the total number of rows in a database table... Here is one of the simplest... There are other methods...
Example #1
This will return the total number of rows in the table... This is a straight query, without a WHERE clause, so it won't work for things like calculating the number of published Etomite documents - it only counts raw data, which is what you will want most of the time...
Example #2
This query should return the total number of documents that you are serving to your visitors, as long as your menu is set to use the same WHERE clause...
Hope this helps, if you haven't already found yur solution...
Example #1
$rs = $etomite->dbQuery("SELECT * FROM <your_table_name_here>");
$count = $etomite->recordCount($rs);This will return the total number of rows in the table... This is a straight query, without a WHERE clause, so it won't work for things like calculating the number of published Etomite documents - it only counts raw data, which is what you will want most of the time...
Example #2
$rs = $etomite->dbQuery("SELECT * FROM {$etomite->db}site_content WHERE `published`=1 AND `deleted`=0 AND `showinmenu`=1");
$count = $etomite->recordCount($rs);This query should return the total number of documents that you are serving to your visitors, as long as your menu is set to use the same WHERE clause...
Hope this helps, if you haven't already found yur solution...
#9
Posted 30 April 2009 - 02:42 PM
Here is another method of finding the total number of rows when using a LIMIT clause in a query, such as when using pagination... The count is calulated before the LIMIT filter is applied... This method uses a MySQL internal constant and an internal function... By placing the SQL_CALC_FOUND_ROWS internal constant into the query we are able to grab the count of the total number of rows that fit our main query criteria... A second query which includes the FOUND_ROWS() MySQL function doesn't actually perform a query on the data itself, it only grabs the number stored in SQL_CALC_FOUND_ROWS, so this second query is completed faster... It should be noted, however, that using SQL_CALC_FOUND_ROWS can make the initial query slower depending on the rest of your query criteria... Whether inex optimization would help performance or not is debatable...
In the example below $rs will only hold a maximum of 10 rows while $count will hold the total number of rows that met the WHERE criteria... You can then use $count for your pagination link calculations...
In the example below $rs will only hold a maximum of 10 rows while $count will hold the total number of rows that met the WHERE criteria... You can then use $count for your pagination link calculations...
$rs = $etomite->dbQuery("
SELECT SQL_CALC_FOUND_ROWS *
FROM {$etomite->db}site_content
WHERE `published`=1
AND `deleted`=0
AND `showinmenu`=1
LIMIT 10
");
$rsCountSQL = $etomite->dbQuery("SELECT FOUND_ROWS()");
$rsCountRow = $etomite->fetchRow($rsCountSQL);
$rsCount = $rsCountRow['FOUND_ROWS()']; /* total number of rows that met our query criteria */
Share this topic:
Page 1 of 1


Help
Back to top
MultiQuote








