Advertisement:

Author Topic: SimplePortal  (Read 1507929 times)

Offline Sudhakar Arjunan

  • Sophist Member
  • *****
  • Posts: 1,227
  • Gender: Male
  • SMF is the best forum tool
    • IT Acumens - Webdesigning & Webhositing services in Chennai
Re: SimplePortal
« Reply #320 on: May 02, 2008, 01:57:08 PM »
Thank you SiNaN

Ok and let me know how to hide the karma,because i dont use it and could i club two or more boards in index page .

And kindly let me know what code i could change to overcome the Arcade error.


Hope you have checked my above post and kindly try to fix something SiNaN.

Thanks in Advance,
Sudhakar , Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #321 on: May 02, 2008, 03:22:01 PM »
Anyone know how to make the random image block thumbnail a bit bigger?

This code here that's found in the Sportal.template.php doesnt seem to do it:

Code: [Select]
$modSettings['gallery_url'] . $gallery_picture['filename'] . '" height="78" width="120" ')  . '
I'd like to add a small border around them too.

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #322 on: May 02, 2008, 04:03:35 PM »
Hi SiNaN,
Although I am new to Simple Portal. I just upgraded my SMF 1.1.4 to 1.1.5 then I uploaded your simple portal and I have errors after installing and the result wasn't good at all so I decided to uninstall it. Do you have any upgrade as regard the new SMF 1.1.5 ?

www.dejimanaire.com
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #323 on: May 02, 2008, 04:07:39 PM »
Hi SiNaN,
Although I am new to Simple Portal. I just upgraded my SMF 1.1.4 to 1.1.5 then I uploaded your simple portal and I have errors after installing and the result wasn't good at all so I decided to uninstall it. Do you have any upgrade as regard the new SMF 1.1.5 ?

www.dejimanaire.com

I think you can install it in 1.1.5

did you get these errors:

5.     Execute Modification     ./Sources/ModSettings.php     Test failed
6.    Execute Modification    ./Themes/default/index.template.php       Test failed



Did you try to edit by hand?

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #324 on: May 02, 2008, 04:21:32 PM »
That was the Exact Errors I got. So what help have you  for me?
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #325 on: May 02, 2008, 04:25:26 PM »
Hi SiNaN,
Although I am new to Simple Portal. I just upgraded my SMF 1.1.4 to 1.1.5 then I uploaded your simple portal and I have errors after installing and the result wasn't good at all so I decided to uninstall it. Do you have any upgrade as regard the new SMF 1.1.5 ?

www.dejimanaire.com

I think you can install it in 1.1.5

did you get these errors:

5.     Execute Modification     ./Sources/ModSettings.php     Test failed
6.    Execute Modification    ./Themes/default/index.template.php       Test failed



Did you try to edit by hand?

Further more I didn't see the setting in the Admin CP>Features and Options   >>>>>>>>> Simple Portal <<<<<<<<<<     
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: SimplePortal
« Reply #326 on: May 02, 2008, 04:27:15 PM »
Madman71;

For the first message: SPortal.php stands for the database queries, building up the arrays to show in template file. And SPortal.template.php file outputs the data you get with the SPortal.php. Also it includes the SPortal.english.php file, which includes the language variables. This is the simple page for the SMF.

The random attachment code will be a bit hard code for a starter but look at the codes below, if you can understand them:

Code: [Select]
function sp_randomattachpic()
{
global $modSettings, $scripturl, $db_prefix;

//Find max.
$dbresult = db_query("
SELECT ID_ATTACH
FROM {$db_prefix}attachments
ORDER BY ID_ATTACH DESC
LIMIT 1", __FILE__, __LINE__);

$max = mysql_fetch_assoc($dbresult);
$check = 0;

while($check == 0) {

//Random it.
$idpic = rand(1, $max['ID_ATTACH']);

// Find the pictures.
$request = db_query("
SELECT ID_ATTACH, ID_MEMBER, filename, width, height
FROM {$db_prefix}attachments
WHERE ID_MEMBER = '0' AND width <> 0 AND ID_ATTACH = $idpic
LIMIT 1", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
{

//Fix for the height.
if($row['height'] > 50)
$height = '50';
else
$height = $row['height'];

//Fix for the width.
if($row['width'] > 50)
$width = '50';
else
$width = $row['width'];

//Build up the array.
$return[] = array(
'id' => $row['ID_ATTACH'],
'filename' => $row['filename'],
'image' => '<img src="' . $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=image" alt="" border="0" height="' . $width . '" width="' . $width . '" />',
);
}

mysql_free_result($request);

//Did you find what you search for?
if(!empty($return) || empty($max))
$check = 1;
}

//Output it! Rather simple, yeah? :P
foreach ($return as $attach) {
echo $attach['image'];
}
}

A simple code for displaying random image attachment.

asudhakar;

You can turn karma off from

Admin CP >> Features and Options >> Karma

You mean to include 2 board for the boardnews block?

Madman71;

I guess you have the GD module installed. So you should increase the thumbnail file size from the gallery options.

Dejiman;

It works for the 1.1.5 also. You should make the changes manually in these files.

First copy your initial ModSettings.php file and index.template.php file. Then change them with the new fresh ones. Apply the mod and make the changes for your old files manually. After the files that you have edited manually.
Former SMF Core Developer | My Mods | SimplePortal

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #327 on: May 02, 2008, 04:40:10 PM »
PLease indicate which file. is it the Sportal.template.php    ?
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #328 on: May 02, 2008, 05:06:07 PM »
PLease indicate which file. is it the Sportal.template.php    ?

When you installed it it should have told you which files failed. Did you get any files that failed to install?  Those files that fail are usually the ones that need hand editing.

I had to hand edit these 2 files:

 ./Sources/ModSettings.php     
  ./Themes/yourtheme/index.template.php

the index.temp is the one in your 3party theme

But that is me. You might be different.  The installer should tell you which ones fail.

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #329 on: May 02, 2008, 05:20:29 PM »
PLease indicate which file. is it the Sportal.template.php    ?

When you installed it it should have told you which files failed. Did you get any files that failed to install?  Those files that fail are usually the ones that need hand editing.

I had to hand edit these 2 files:

 ./Sources/ModSettings.php    
  ./Themes/yourtheme/index.template.php

the index.temp is the one in your 3party theme

But that is me. You might be different.  The installer should tell you which ones fail.

I got that.
Please post the code I am to Edit here please. so that I will imitate yours for my.
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline cleanfiles

  • Semi-Newbie
  • *
  • Posts: 94
Re: SimplePortal
« Reply #330 on: May 02, 2008, 05:23:44 PM »
Quote
You mean a block which shows where people are? Like the page whosonline?

Yeah thats what I was trying to say. :D

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #331 on: May 02, 2008, 05:27:03 PM »
PLease indicate which file. is it the Sportal.template.php    ?
SOrry, didnt see your post where u got your errors.

ok, this is what i did.  I installed the mod and got those 2 errors, then i ran the mod zip file (the one you downloaded) here: http://sleepycode.com/PackageParser/index.php

the parser does not have 1.1.5 set up yet. You can try it with 1.1.4 to see if it work.

set operation to INSTALL
and set  to All Edits (default)

The only theme edits  tells you to edit your index temp.  This is incorrect.  Go with those settings above and see if it will work.  If it does work, ONLY EDIT the files that you got your error on.

in this case it will be yourtheme/ndex.template.php
and sources/ModSettings.php  i


edit: we just cant give you the code that we use from our files.  Everyone will more than likely have a different configuration. 
« Last Edit: May 02, 2008, 06:07:24 PM by madman71 »

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #332 on: May 02, 2008, 05:42:02 PM »
Madman71;

For the first message: SPortal.php stands for the database queries, building up the arrays to show in template file. And SPortal.template.php file outputs the data you get with the SPortal.php. Also it includes the SPortal.english.php file, which includes the language variables. This is the simple page for the SMF.

The random attachment code will be a bit hard code for a starter but look at the codes below, if you can understand them:

Code: [Select]
function sp_randomattachpic()
{
global $modSettings, $scripturl, $db_prefix;

//Find max.
$dbresult = db_query("
SELECT ID_ATTACH
FROM {$db_prefix}attachments
ORDER BY ID_ATTACH DESC
LIMIT 1", __FILE__, __LINE__);

$max = mysql_fetch_assoc($dbresult);
$check = 0;

while($check == 0) {

//Random it.
$idpic = rand(1, $max['ID_ATTACH']);

// Find the pictures.
$request = db_query("
SELECT ID_ATTACH, ID_MEMBER, filename, width, height
FROM {$db_prefix}attachments
WHERE ID_MEMBER = '0' AND width <> 0 AND ID_ATTACH = $idpic
LIMIT 1", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
{

//Fix for the height.
if($row['height'] > 50)
$height = '50';
else
$height = $row['height'];

//Fix for the width.
if($row['width'] > 50)
$width = '50';
else
$width = $row['width'];

//Build up the array.
$return[] = array(
'id' => $row['ID_ATTACH'],
'filename' => $row['filename'],
'image' => '<img src="' . $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=image" alt="" border="0" height="' . $width . '" width="' . $width . '" />',
);
}

mysql_free_result($request);

//Did you find what you search for?
if(!empty($return) || empty($max))
$check = 1;
}

//Output it! Rather simple, yeah? :P
foreach ($return as $attach) {
echo $attach['image'];
}
}

A simple code for displaying random image attachment.

asudhakar;

You can turn karma off from

Admin CP >> Features and Options >> Karma

You mean to include 2 board for the boardnews block?

Madman71;

I guess you have the GD module installed. So you should increase the thumbnail file size from the gallery options.

Dejiman;

Madman71;

For the first message: SPortal.php stands for the database queries, building up the arrays to show in template file. And SPortal.template.php file outputs the data you get with the SPortal.php. Also it includes the SPortal.english.php file, which includes the language variables. This is the simple page for the SMF.

The random attachment code will be a bit hard code for a starter but look at the codes below, if you can understand them:

----------------------------------------------------------------------------------------







thanks sinan.
im gonna play with my trial forum this weekend
« Last Edit: May 02, 2008, 05:44:46 PM by madman71 »

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #333 on: May 02, 2008, 05:49:25 PM »
Sinan,

Yes, i do have the GD installed.  However, i do not have the option to change the size of the thumbnails in the Gallery only max file size and dimension
Max allowed image height:
Max allowed image width:

only those.

i'll look some more.  And thanks for everything

maybe i'll turn GD off

as of right now they are 55x75 in Width and Height :(
« Last Edit: May 02, 2008, 05:51:08 PM by madman71 »

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #334 on: May 02, 2008, 06:04:46 PM »
is any body answering me please? I need the adjusted code please for the SPORTAL thanks
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #335 on: May 02, 2008, 06:06:41 PM »

Offline ne.miguelito

  • Jr. Member
  • **
  • Posts: 355
Re: SimplePortal
« Reply #336 on: May 02, 2008, 08:13:04 PM »
give for more than a board?

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #337 on: May 02, 2008, 09:04:38 PM »
Here is the site before SIMPLE PORTAL

SMF GOOD


THE SITE AFTER SIMPLE PORTAL

SMF BAD


Please am having difficulties editing my sportal.php  and index.template.php
Please give me step by step guidline to your own simple portal
Thanks
www.dejimanaire.com
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Offline madman71

  • Full Member
  • ***
  • Posts: 652
Re: SimplePortal
« Reply #338 on: May 02, 2008, 09:09:00 PM »
Here is the site before SIMPLE PORTAL

SMF GOOD


THE SITE AFTER SIMPLE PORTAL

SMF BAD


Please am having difficulties editing my sportal.php  and index.template.php
Please give me step by step guidline to your own simple portal
Thanks
www.dejimanaire.com

again:
http://www.simplemachines.org/community/index.php?topic=227599.msg1528565#msg1528565

Offline dejiman

  • Semi-Newbie
  • *
  • Posts: 91
  • Gender: Male
  • Live and Let Live
    • THE SEARCH STOPS HERE COMMUNITY FORUM
Re: SimplePortal
« Reply #339 on: May 02, 2008, 09:17:10 PM »
Thanks for your care so far.
www.dejimanaire.com
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES