juhohei wrote:So I still couldn't get this working..
I'm trying to get recent images to my separate portal index.
What should I do :
Step 1:
I copy that code to my separate .php page anywhere I wan't and just add <?php to the begin and ?> to the end?
Step 2:
w00t?
Step 3:
w00t?
-----FIND-----
$sql = 'SELECT a.* , b.*
---- ADD BEFORE ----
/////////CONFIGURATION PART
$title_on = true; // true make title information able to be view
$nview_on = true; // true make nview information able to be view
$rate_on = true; // true make rate information able to be view
$by_on = true; // true make by information able to be view
$comment_on = true; // true make comment link able to be view
-----FIND-----
'RATE_FLAG' => true ,
---- REPLACE WITH ----
'BY_ON' => $by_on, // Flag
'TITLE_ON' => $title_on, // Flag
'NVIEW_ON' => $nview_on, // Flag
'RATE_FLAG' => $rate_on ,
'TITLE' => $row['pic_title'],
'N_VIEW' => $row['pic_views'],
'COMMENT_ON' => $comment_on,
'COMMENT_LINK' => "gallery/viewpic.php?pic_id=" . $row['pic_id'],
-----FIND-----
<div>by {imm_galleria.BY} </div>
-----REPLACE WITH -------
<!-- IF imm_galleria.BY_ON --><div>by {imm_galleria.BY} </div> <!-- ENDIF -->
<!-- IF imm_galleria.TITLE_ON --><div>Title : {imm_galleria.TITLE} </div><!-- ENDIF -->
<!-- IF imm_galleria.NVIEW_ON --><div>View : {imm_galleria.N_VIEW} times</div><!-- ENDIF -->
<!-- IF imm_galleria.COMMENT_ON --><div> <a href="{imm_galleria.COMMENT_LINK}"> Comments </a></div><!-- ENDIF -->
Zuritz wrote:by: Zuritz (with link to postauthor profile)
Comments: 3 (how many comments)
----FIND----
'BY' => $row['pic_username'],
----REPLACE WITH-----
'BY' => "<a href=memberlist.php?mode=viewprofile&u=" . $row['pic_user_id'] . ">" . $row['pic_username'] . "</a> ",


armstrong wrote:so if you tell me certain steps, like:
find: xxxxx
add after: yyyy
Admin wrote:About comments number... doing it now![]()

----FIND----
$flag = false;
---ADD BEFORE---
$sql_com = 'SELECT * FROM ' . GALLERY_COMMENT_TABLE . "
WHERE comment_pic_id = '" . $row['pic_id'] ."'";
$result_com = $db->sql_query($sql_com);
$rows_com = $db->sql_fetchrowset($result_com);
$db->sql_freeresult($result_com);
$num_com = count($rows_com);
----FIND----
'COMMENT_LINK' => "gallery/viewpic.php?pic_id=" . $row['pic_id'],
---- ADD AFTER ----
'COMMENT_COUNT' => $num_com,---- FIND ----
<!-- IF imm_galleria.COMMENT_ON --><div> <a href="{imm_galleria.COMMENT_LINK}"> Comments </a></div><!-- ENDIF -->
--- REPLACE WITH ----
<!-- IF imm_galleria.COMMENT_ON --><div> <a href="{imm_galleria.COMMENT_LINK}"> Comments ( {imm_galleria.COMMENT_COUNT} )</a></div><!-- ENDIF -->
Users browsing this forum: No registered users and 0 guests