Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Integrating Scroller with a PHP CMS solution
Steph
Junior Member

Posts: 2
Registered: 9/25/2005
Member Is Offline
posted on 9/25/2005 at 05:56 PM Reply With Quote
Integrating Scroller with a PHP CMS solution


Hi

First, let me say, neat solution. I have been working on implementing the xMozilla scroller functions with my CMS solution. Presently content that is displayed in different areas of the CMS uses Marquee function (yuck).

Here's my scenario. I am using a PHP based CMS solution that has integrated MySQL database functionality for pulling all different kinds of CMS data. I have read all of your support forum posts regarding dynamic data integration and my need is a tad different.

My CMS solution uses all PHP based files to define functions and then 3 different overall html templates for correctly defining the presentation of data that is called via those PHP files.

In the case of what I want to do with the scroller, the content is typically called (for example) like this:

Code:
<?php
global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 15;
$content = "<A name= "scrollingCode"></A>";
$content .="<MARQUEE behavior= "scroll" align= "center" direction= "up" height="220" scrollamount= "2" scrolldelay= "25" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE="text-decoration: none"><font color="#666666"><b>Last $amount Forum Messages</b></center>";
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);
$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);
$content .= "<img src="modules/Forums/templates/subSilver/images/icon_mini_message.gif" border="0"alt=""><a href="modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id"STYLE="text-decoration: none"><b> $topic_title </b></a><br><font color="#666666"><i>Last post by <A HREF="modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id"STYLE="text-decoration: none"> $username </a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href="modules.php?name=Forums"STYLE="text-decoration: none">$sitename ]</center>";
$content .= "</a>";
?>


First, let me explain that the above code is a tad out of date with "old style" sql query methods.

Here is the latest version of a "non-scrolling" variant of the code.

Code:
<?php
$sql = "SELECT t.forum_id, topic_id, topic_title, auth_view, auth_read FROM ".$prefix."_bbtopics AS t, ".$prefix."_bbforums AS f WHERE f.forum_id=t.forum_id ORDER BY topic_time DESC LIMIT 10";
$result = $db->sql_query($sql);
$content = "<br>";
while (list($forum_id, $topic_id, $topic_title, $auth_view, $auth_read) = $db->sql_fetchrow($result)) {
if (($auth_view < 2) OR ($auth_read < 2)) {
$content .= "<img src="images/arrow.gif" border="0" alt="" title="" width="9" height="9"> <a href="modules.php?name=Forums&amp;file=viewtopic&amp;t=$topic_id">$topic_title</a><br>";
}
}

$content .= "<br><center><a href="modules.php?name=Forums"><b>$sitename Forums</b></a><br><br></center>";

$db->sql_freeresult($result);

?>


In a nutshell, this code gathers phpBB forums posts data and puts in into a small 140px (120px for content, 20px is theme styling) by 220px block that is displayed in a theme defined location on my domain.

The presentation of that block (the style) is controlled by a static format of my CMS theme. All "blocks" use that theme presentation code, whether they be scrolling blocks or not.

For example, the section of my theme code that handles these blocks looks like this:

Code:
echo "<table border="0" align="center" width="138" cellpadding="0" cellspacing="0">"
."<tr><td style="background-image: url(themes/Steph/images/table-title.gif)" width="138" height="20">"
."&nbsp;&nbsp;&nbsp;<font color="#FFFFFF"><b>$title</b></font>"
."</td></tr><tr><td><img src="themes/Steph/images/pixel.gif" width="100%" height="3" alt=""></td></tr></table>n"
."<table border="0" cellpadding="0" cellspacing="0" width="138">n"
."<tr><td width="138" bgcolor="#000000">n"
."<table border="0" cellpadding="1" cellspacing="1" width="138">n"
."<tr><td width="138" bgcolor="#ffffff">n"
."$content"
."</td></tr></table></td></tr></table><br>";
}

As you can see from the above example, the database permissions are built into the overall CMS structure. There are no <head> or <body> calls as those functions exist as part of the overall wrapper.

Quite simply, I don't want to impact the design of the overall CMS, but rather simply change the code I have now to accomodate the new scroller.

I have no problem integrating a scroller <head> call inside my overall CMS wrapper, but I am running into problems trying to get the scroller to work inside this kind of block structure in doing what I have a regular marquee do.

Suggestions?

I have tried to provide as much information as possible, so please forgive me if this is TMI.

If you want to see a demonstration of both (or either) "block" in action on a page, I can give you urls.

Thanks
Steph
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 10/17/2005 at 10:52 AM Reply With Quote

Please refer to our Customer Care System and provide a live demo link to see the issue.
View User's Profile View All Posts By User U2U Member
Steph
Junior Member

Posts: 2
Registered: 9/25/2005
Member Is Offline
posted on 10/17/2005 at 11:03 AM Reply With Quote

Well, I haven't been able to get it to work no matter what I do. It simply refuses to function within the environment I have described. I can provide a link, but there won't be anything there for you to look at beyond my functional solutions that don't use this product.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Scroller
Product Demonstrations Live Demos:
Multiple vertical scrolling
Horizontal scrolling
Free Download Free Download
Product Documentation Documentation:
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
   
Tigra Scroller PRO
Product Demonstrations Live Demos
Vertical automatic scrolling
Horizontal manual scrolling
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004