vRory
Unemployed.
- May 4, 2011
- 447
- 69
Hello Devbest,
I have been working on switching Quick Menu from ubercms to revcms
my current progression
AND
For web.config
Then in every page search for "<div style="margin-top:7px">"
then below that add
I have been working on switching Quick Menu from ubercms to revcms
my current progression
QUICK-FRIENDS 10%
QUICK-GROUPS 50%
QUICK-ROOMS 100%
Screen shots:
Current issues:
QUICK-FRIENDS, this includes class.users on uber the snippet(s) for it i got was this
PHP:
/**************************************************************************************************/
public static function Is_Online($userId)
{
$result = dbquery("SELECT `online` FROM `users` WHERE `id` = '".$userId."' LIMIT 1");
$row = mysql_fetch_assoc($result);
return $row['online'];
}
}
PHP:
/**************************************************************************************************/
function GetFriendCount($id, $onlineOnly = false)
{
$i = 0;
$q = dbquery("SELECT user_two FROM friendships WHERE user_one = '" . $id . "'");
while ($friend = mysql_fetch_assoc($q))
{
if (!$onlineOnly)
{
$i++;
}
else
{
$isOnline = mysql_result(dbquery("SELECT online FROM users WHERE id = '" . $friend['user_two'] . "' LIMIT 1"), 0);
if ($isOnline == "1")
{
$i++;
}
}
}
return $i;
}
I tried my hardest to try convert to how rev connects ect, as you can probably tell I'm terrible
I had an attempt at the 2nd snippet and got this
PHP:
/*------------------------------------------------------------*/
function GetFriendCount($id, $onlineOnly = false)
{
$i = 0;
$q = mysql_query("SELECT user_two FROM friendships WHERE user_one = '" . $_SESSION['user']['id'] . "'");
while ($friend = mysql_fetch_assoc($q))
{
if (!$onlineOnly)
{
$i++;
}
else
{
$isOnline = mysql_result(mysql_query("SELECT online FROM users WHERE id = '" . $friend['user_two'] . "' LIMIT 1"), 0);
if ($isOnline == "1")
{
$i++;
}
}
}
return $i;
}
ISSUES WITH QUICK-GROUPS
The one main issue is it doesn't display the groups name, this might be an css issue.
Download link :
You must be registered for see links
How to install :
Extract the contents into wwwroot or htdocs
Add these lines to you .htaccess
Code:
RewriteRule ^quickmenu/friends_all(|/)$ /quick-friends.php
RewriteRule ^quickmenu/groups(|/)$ /quick-groups.php
RewriteRule ^quickmenu/rooms(|/)$ /quick-rooms.php
Code:
<rule name="Imported Rule 17">
<match url="^quickmenu/friends_all(|/)$" ignoreCase="false" />
<action type="Rewrite" url="/quick-friends.php" />
</rule>
<rule name="Imported Rule 18">
<match url="^quickmenu/groups(|/)$" ignoreCase="false" />
<action type="Rewrite" url="/quick-groups.php" />
</rule>
<rule name="Imported Rule 19">
<match url="^quickmenu/rooms(|/)$" ignoreCase="false" />
<action type="Rewrite" url="/quick-rooms.php" />
Then in every page search for "<div style="margin-top:7px">"
then below that add
PHP:
<ul>
<li id="myfriends" class=""><a href="#"><span>My Friends</span></a><span class="r"></span></li>
<li id="mygroups" class=""><a href="#"><span>My Groups</span></a><span class="r"></span></li>
<li id="myrooms" class=""><a href="#"><span>My Rooms</span></a><span class="r"></span></li>
</ul>
*NOTICE I TRIED, I'M JUST TRYING TO MAKE REVCMS MORE LIKE UBER
I'LL CONTINUE WITH THIS, IF THEIRS ANY ERRORS NOT STATED ABOVE OR EXPLOITS POST BELOW AND IF YOU FIND ANY FIXES ALSO SHARE THEM*