News:

Wondering if this will always be free?  See why free is better.

Main Menu

SimplePortal

Started by SimplePortal Team, March 10, 2008, 11:16:07 PM

Previous topic - Next topic

runebergen


Anyone here that also use Ultimate Profile?
That could code two nice codes that I'd love to use from Ultimate Profile, on my Forum fontpage, using the mod Simple Portal

- Most Popular Users
(top 5 with most friends)

- Most Popular Walls
(top 5 with most comments)

Would love that ;) Will try myself.. if I figure it out, I'll let you know.. hehe

Sudhakar Arjunan

Quote from: runebergen on August 14, 2008, 02:23:53 PM

Anyone here that also use Ultimate Profile?
That could code two nice codes that I'd love to use from Ultimate Profile, on my Forum fontpage, using the mod Simple Portal

- Most Popular Users
(top 5 with most friends)

- Most Popular Walls
(top 5 with most comments)

Would love that ;) Will try myself.. if I figure it out, I'll let you know.. hehe

Hi Runebergen,

you could go to sportal admin page and include the top users block from add block menu.
And you will have a block for displaying most popular comments too.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

runebergen

#1042
yeah, but its not that I'm looking for ;) Not top forum posters...


But top users of ULTIMATE PROFILE :)

So its TOP 5 WITH MOST BUDDIES, and TOP 5 WITH MOST PROFILE COMMENTS


I've figured out almost the top 5 buddies...



SELECT `approved` , `ID_MEMBER`
FROM `radioforum_buddies`
where `approved` = 1
GROUP BY `ID_MEMBER`
ORDER BY `ID_MEMBER` ASC
LIMIT 0 , 5


Will get top 5 users with most buddies
But I'm having a hard time to make it also show how MANY buddies the top 5 have.. hehe

Might figure it out

But if anyone smart out there , knows the way, I'd love to hear .... .:)


runebergen

Figured out TOP 5 USERS WITH MOST FRIENDS  :D :D :D :D :D


SELECT COUNT(`approved`) as 'Number',`ID_MEMBER`
FROM `radioforum_buddies`
where `approved` = 1
GROUP BY `ID_MEMBER`
ORDER BY `Number` desc
LIMIT 0 , 5

dwd2000

Quote from: [SiNaN] on August 14, 2008, 03:36:09 AM
This a mod like the ones you've installed. But it doesn't make too much changes on your default files, mostly it uses its own files. What you need to do is, just install the mod without getting any error and create your blocks.

To add; we have built-in blocks for SMF Gallery and SMF Arcade mods.

Installed, no errors, but code at the top of the page. Found the answer to that problem within the forums here.

Thanks.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

C.Jack

Hi, SiNaN.

Thanks for a great Mod.  :)

I'm getting an error maybe someone here could help me with. I don't know much at all about php or databases... or computers.  ;D I just know that I get one of these in my error logs everytime someone opens sportal at my site.
---------------------------
http://raptor-poker.com/forum/index.php 
2: Invalid argument supplied for foreach()
File: /home/therapto/public_html/raptorpoker/forum/Sources/SPortal.php
Line: 1516
---------------------------
Thanks in advance for any help.
C.Jack

ccbtimewiz

Quote from: CaptJack on August 14, 2008, 11:50:04 PM
Hi, SiNaN.

Thanks for a great Mod.  :)

I'm getting an error maybe someone here could help me with. I don't know much at all about php or databases... or computers.  ;D I just know that I get one of these in my error logs everytime someone opens sportal at my site.
---------------------------
http://raptor-poker.com/forum/index.php 
2: Invalid argument supplied for foreach()
File: /home/therapto/public_html/raptorpoker/forum/Sources/SPortal.php
Line: 1516
---------------------------
Thanks in advance for any help.

Did you make any alterations to that file, or is it ROOTB? (Right out of the box).

C.Jack

I haven't modified Sportal at all. I'm using smf 1.1.5 with the default theme.
It's likely that I've blotched something, but I haven't knowingly done anything to it.
I also have errors with Charles Hill's Blog Mod, and I've lost my avatars. LOL!
C.Jack

Sudhakar Arjunan

Hi Author,

I went through the latest modifications.

And found the V2.03 of Simple Portal.

Could you tell me the whether it as features or only Bug fix.

Method to Upload. - Will it have any update to the previous version.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

runebergen

#1049
Quote from: runebergen on August 14, 2008, 02:23:53 PM

Anyone here that also use Ultimate Profile?
That could code two nice codes that I'd love to use from Ultimate Profile, on my Forum fontpage, using the mod Simple Portal

Top 5 Most Popular Profiles
(top 5 with most friends)

Top 5 Most Popular Walls
(top 5 with most comments)

Would love that ;) Will try myself.. if I figure it out, I'll let you know.. hehe


Here is the code if anyone else with Ultimate Profile wants to add similar feature to Simple Portal Boxes

Sinan might fix up the code a little, and rather use the $db_prefix function.. :)
But it works as it is without it (couldnt quite figure out the use of $db_prefix)




<?

/**********************************************************************************
* PopularProfiles.php                                                             *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* =============================================================================== *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

function most_popular_profile() {


// VARIABLES FOR DATABASE - EDIT THIS FOR YOUR DATABASE
$DB_host = "localhost";
$DB_username = "xxxx";
$DB_passowrd ="xxxx";
$DB_name = "xxx";
$SMF_prefix ="smf_";


global $db_prefix,$ID_MEMBER, $user_info, $scripturl;

mysql_connect($DB_host , $DB_username, $DB_passowrd ) or
    die("Could not connect: " . mysql_error());
mysql_select_db($DB_name );

$query = 'SELECT COUNT(`approved`) as \'Number\',`ID_MEMBER`'
        . ' FROM `'.$SMF_prefix.'buddies`'
        . ' where `approved` = 1'
        . ' GROUP BY `ID_MEMBER`'
        . ' ORDER BY `Number` desc'
        . ' LIMIT 0 , 5';

$result =  mysql_query($query);

if (!$result) {
    echo mysql_error();
    exit;
}

if (mysql_num_rows($result) == 0) {
    echo "No entries found yet";
    exit;
}

echo '<table width="100%">';

while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {

$ID = $row["ID_MEMBER"];

     $sql = 'SELECT `realName` FROM `'.$SMF_prefix.'members` '
        . ' where `ID_MEMBER` = '
. $ID
        . ' LIMIT 0, 30 ';

$user =  mysql_query($sql);
   while ($row2 = mysql_fetch_array($user,MYSQL_ASSOC)) {
   echo '<tr>';
   echo '<td><a href="'.$scripturl.'?action=profile;u='.$ID.'">';
   echo $row2["realName"].'</a></td>';
   echo '<td style="text-align:right">'.$row["Number"].' buddies</td>';
   echo '</tr>';
   
   }
   
}

echo '</table>';

}


function most_popular_wall() {

// VARIABLES FOR DATABASE - EDIT THIS FOR YOUR DATABASE
$DB_host = "localhost";
$DB_username = "xxxx";
$DB_passowrd ="xxxx";
$DB_name = "xxx";
$SMF_prefix ="smf_";

$sql = 'SELECT COUNT(`COMMENT_MEMBER_ID`) as `Number`,`COMMENT_MEMBER_ID`'
        . ' FROM `'.$SMF_prefix.'profile_comments`'
        . ' GROUP BY `COMMENT_MEMBER_ID`'
        . ' ORDER BY `Number` desc'
        . ' LIMIT 0 , 5 ';


$result =  mysql_query($sql);

if (!$result) {
    echo mysql_error();
    exit;
}

if (mysql_num_rows($result) == 0) {
    echo "No entries found yet";
    exit;
}

echo '<table width="100%">';

while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {

$ID = $row["COMMENT_MEMBER_ID"];


$sql = 'SELECT `realName` FROM `'.$SMF_prefix.'members` '
        . ' where `ID_MEMBER` = '
. $ID
        . ' LIMIT 0, 30 ';

$user =  mysql_query($sql);
   while ($row2 = mysql_fetch_array($user,MYSQL_ASSOC)) {
   echo '<tr>';
   echo '<td><a href="'.$scripturl.'?action=profile;u='.$ID.'">';
   echo $row2["realName"].'</a></td>';
   echo '<td style="text-align:right">'.$row["Number"].' comments</td>';
   echo '</tr>';
   
   }



}


echo '</table>';


}




?>



You can put this code in SOURCES as PopularProfile.php

You must edit this part (2 places) in the code, to match your database settings :

// VARIABLES FOR DATABASE - EDIT THIS FOR YOUR DATABASE
$DB_host = "localhost";
$DB_username = "xxxx";
$DB_passowrd ="xxxx";
$DB_name = "xxx";
$SMF_prefix ="smf_";


Use it left or right side boxes, with this code :


include ('Sources/PopularProfiles.php');
echo most_popular_profile() ;



:)

Stock

I currently use tinyportal but only because of the customizable side bar, but i do by far prefer the simple portal for its portal functions. Is there any other fully customizable side bar that i can put recent posts, board stats, and our chat box in or could i just install simple portal for the portal functions and shut off tinyportal's portal.

runebergen

#1051
You can add as many HTML or PHP box as you want ;)

Thats the beauty  ;D


Within these boxes you can add any code, such as for example the easy to use functions from SSI.php

http://docs.simplemachines.org/index.php?topic=400

The simplisity, and easy to operate and make work aproach from Simple Portal, by FAR outshines TinyPortal in my opinion... :)

Stock

what i wanted is a sidebar that shows up throughout the whole site(excluding the admin panel) and thats what tinyportal has. I know that you can put just about anything in simpleportal but i need a side bar that shows on almost every page.

Sudhakar Arjunan

Quote from: runebergen on August 15, 2008, 01:03:06 PM
:)

Hi Runebergen,

This is a good work . Lets the author fix some small changes in it.

Hope he will add this up in his next release.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Stock

does anyone know if this is compatible with the tinyportal side bar that goes through the whole site if i turn off all of its portal related functions?

runebergen

Quote from: Stock on August 15, 2008, 07:22:12 PM
does anyone know if this is compatible with the tinyportal side bar that goes through the whole site if i turn off all of its portal related functions?

Good question, I dont really know...

Maybe someone do ?

Stock

I doubt the tiny and simple portal would work togther at all even with some features disabled. I suppose theres a seperate mod out there for a side bar. Anyone help me with this?

C.Jack

@Stock
I'm using MKPortal and Sportal. I have my forum and Sportal wrapped, but I've opted to unload MKP's sidebars when viewing them. You could use that setup and just leave one of the sidebar columns active during forum view. Of course you would need to turn off the corresponding sidebar for Sportal or it wouldn't look right. MKP also has HTML and php boxes available. The downside is that MKP has to be loaded as your site index. You could move everything into a subdirectory, but MKP still has to be indexed ahead of your forum.
C.Jack

grammaton

Hi @ll,

i am using SimpelPortal v.1.2 for some time now, and i have some strange errors in the errorlog.

For each user online at that time the following error message appears a few times in a row:

http://myhomepage/myforum/index.php 
8: Undefined index: 180
Datei: /var/www/forum/Sources/SPortal.php
Zeile: 585

and after that it shows this message .. also a few times

http://myhomepage/myforum/index.php 
8: Undefined index: 180
Datei: /var/www/forum/Sources/SPortal.php
Zeile: 484

I have looked into the code and found out that this has something to do with the show recent posts and show recent topics functions of the portal.
I couldnt reproduce the error .. usually it shows up every couple of days.

Would be nice if sbdy could help me with this. :)

PRaDiUS

#1059
Quote from: dwd2000 on August 14, 2008, 09:09:39 PM
Installed, no errors, but code at the top of the page. Found the answer to that problem within the forums here.

I am having the same problem with the code at the top. What is the answer you found to remedy this problem? Anyone?

this is what its showing at the top of my forum after I install.

Quote
// SP General $txt['sp-forum'] = 'Forum'; $txt['sp-adminTitle'] = 'SPortal Admin'; $txt['sp-adminCatTitle'] = 'SimplePortal'; $txt['sp-articlesCategory'] = 'Article Category'; $txt['sp-articlesNoCategory'] = 'Do not Publish'; $txt['sp-make_article'] = 'Make Article'; $txt['error_sp_no_message_id'] = 'Invalid message ID.'; $txt['error_sp_article_exists'] = 'Article already exists.'; $txt['error_sp_cannot_add_article'] = 'You don\'t have permission to add article.'; $txt['error_sp_label_empty'] = 'Label is left empty.'; $txt['error_sp_name_empty'] = 'Name is left empty.'; $txt['error_sp_no_category'] = 'There is no article category created.'; // SP Permissions $txt['permissiongroup_sp'] = 'SimplePortal'; $txt['permissionname_sp_moderate'] = 'Moderate portal'; $txt['permissionhelp_sp_moderate'] = 'This permission allows users to access the SimplePortal Admin panel.'; $txt['permissionname_sp_add_article'] = 'Can add article'; $txt['permissionhelp_sp_add_article'] = 'This permission allows users to add articles.'; $txt['permissionname_sp_auto_article_approval'] = 'Auto article approval'; $txt['permissionhelp_sp_auto_article_approval'] = 'This permission allows users to add articles without approval.'; // SP Blocks $txt['sp-userpost'] = 'Posts'; $txt['sp-userkarma'] = 'Karma'; $txt['sp-usertmessage'] = 'Total Messages'; $txt['sp-usernmessage'] = 'New Messages'; $txt['sp-userprofile'] = 'Profile'; $txt['sp-userlogout'] = 'Logout'; $txt['sp-onlineguest'] = 'Online Guests'; $txt['sp-onlineuser'] = 'Online Users'; $txt['sp-onlinehuser'] = 'Hidden Users'; $txt['sp-onlinetuser'] = 'Total Users'; $txt['sp-onlineouser'] = 'Online Users'; $txt['sp-statmember'] = 'Total Members'; $txt['sp-statpost'] = 'Total Posts'; $txt['sp-stattopic'] = 'Total Topics'; $txt['sp-statcategory'] = 'Total Categories'; $txt['sp-statboard'] = 'Total Boards'; $txt['sp-qsearchsearch'] = 'Search'; $txt['sp-tposterpost'] = ' posts'; $txt['sp-tboardname'] = 'Board'; $txt['sp-tboardpost'] = 'Posts'; $txt['sp-ttopicname'] = 'Topic'; $txt['sp-ttopicpost'] = 'Posts'; $txt['sp-grpictureviews'] = 'Views:'; $txt['sp-grpicturesender'] = 'By:'; $txt['sp-grpictureguest'] = 'Guest'; $txt['sp-arcadeplay'] = 'The Top Players'; $t

          [ RGXbox.com ]

Advertisement: