Indexu use phpmailer class to send email. By default it use mail() function. Inside admin panel, there is an option to switch to use SMTP instead if mail().
Phpmailer use socket connection to connect to SMTP mail server. So before you use it, make sure your webhost allow fsockopen() function. It this function is disabled, then email won’t be sent.
In earlier post, I show you how to create custom category listing in front page. Now will show you how to create custom category listing in category pages (browse.html). The real challenge here is to construct the category path as we are deep inside category level.
First, you need to remove this tag from browse.html
Then replace with the following codes
<%php%>
global $dbConn, $indexu, $cat;
$img_path = $indexu->config['site_url'].'/themes/'.$indexu->config['active_theme'].'/cat';
$query = "select category_id, name, image
from idx_category
where parent_id = '$cat'";
$result = $dbConn->Execute($query);
$limit = $result->RecordCount();
$i=0;
while ($row = $result->FetchRow()) {
$i++;
// here we construct the category url, need to fetch the parents
$parents = $dbConn->Lookup('parents', 'idx_category_path', "category_id = '{$row['category_id']}'");
$arr = explode(';',$parents);
array_pop($arr);
array_pop($arr);
array_shift($arr);
array_reverse($arr);
unset($path);
foreach ($arr as $k => $v) {
$name = $dbConn->Lookup('name', 'idx_category', "category_id = '$v'");
$path .= SEOReplace($name).'/';
}
$url = $path.SEOReplace($row['name']).'/';
print "<div class='subList'><a href='$url'>{$row['name']}</a></div> \n";
}
<%/php%> |
Usually language code is constructed like es_ES or fr_FR. However in some servers, usually on linux box, the server locale code need explicitly add .utf8. So if you have problem with strange characters where utf8 doesn’t work. Do the following steps:
1) rename the language folder, add .utf8.
/lang/es_ES.utf8
/lang/fr_FR.utf8
2) language switching also need to be modified to:
http://www.nicecoder.com/testrial/upload/set_language.php?lang_id=es_ES.utf8&back=/testrial/upload/
Notice that it is now become lang_id=es_ES.utf8.
Today I will show you a basic instruction how to setup a new mysql database for your indexu directory by using cpanel.
1) Open cpanel page, usually something like www.domain.com:2082, then enter your username and password that are provided by your hosting account.
2) Click on manage mysql database

3) Create a new mysql database

4) Create a new user name. Enter username and password.

5) Before you can use the database, you need to assign user to get access the database

6) Give the user all privilege

That’s it. Now you have mysql ready to use with indexu. Form this example it will be:
MYSQL username: indexute_dody
MYSQL password: poi0982
MYSQL host: localhost
MYSQL database name: indexute_indexudir

Bored to have listing in single column? I will show you how to make listing in multiple columns.
Edit rows.html, clean the codes and replace with:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| <%if $number % 2 eq 1%>
<div class="row_nl">
<%/if%>
<div class="row_item myrow">
<img src="http://open.thumbshots.org/image.aspx?url=<%$url%>" alt="<%$title%>" style="border:1px solid #777;">
<h3><a href="<%$url%>" name="link_<%$link_id%>"><%$title%></a></h3>
<p><%$description%></p>
<p><a href="<%$url%>" name="link_<%$link_id%>"><%$url%></a> - <a href="<%$site_url%>/<%$detail_page_url%>"><%t%>details<%/t%></a></p>
<p>Google PR <img src="<%$site_url%>/googlepr.php?link_id=<%$link_id%>" alt="" /></p>
</div>
<%if $number % 2 eq 0%>
</div>
<%/if%> |
Then add these 2 css classes to construct the layout.
.row_nl {
clear:both;
width:100%;
margin-bottom: 10px;
}
.row_item {
margin-right:10px;
display:inline;
width:285px;
float:left;
} |