• Welcome to Simple Machines Community Forum. Please login or sign up.
December 07, 2021, 03:46:43 AM

News:

SMF 2.0.18 has been released! Please update. Read more.


SimplePortal

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

Previous topic - Next topic

Sudhakar Arjunan

Quote from: asudhakar on May 02, 2008, 05:34:02 AM
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

madman71

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:

$modSettings['gallery_url'] . $gallery_picture['filename'] . '" height="78" width="120" ')  . '

I'd like to add a small border around them too.

dejiman

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

madman71

Quote from: dejiman 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

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?

dejiman

That was the Exact Errors I got. So what help have you  for me?
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

dejiman

Quote from: madman71 on May 02, 2008, 04:07:39 PM
Quote from: dejiman 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

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

[SiNaN]

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:

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

dejiman

PLease indicate which file. is it the Sportal.template.php    ?
IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

madman71

Quote from: dejiman on May 02, 2008, 04:40:10 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.

dejiman

Quote from: madman71 on May 02, 2008, 05:06:07 PM
Quote from: dejiman on May 02, 2008, 04:40:10 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

cleanfiles

QuoteYou mean a block which shows where people are? Like the page whosonline?

Yeah thats what I was trying to say. :D

madman71

May 02, 2008, 05:27:03 PM #331 Last Edit: May 02, 2008, 06:07:24 PM by madman71
Quote from: dejiman on May 02, 2008, 04:40:10 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. 

madman71

May 02, 2008, 05:42:02 PM #332 Last Edit: May 02, 2008, 05:44:46 PM by madman71
Quote from: [SiNaN] 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:

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;

Quote from: [SiNaN] 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:

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







thanks sinan.
im gonna play with my trial forum this weekend

madman71

May 02, 2008, 05:49:25 PM #333 Last Edit: May 02, 2008, 05:51:08 PM by madman71
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 :(

dejiman

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


ne.miguelito

give for more than a board?

dejiman

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

madman71

Quote from: dejiman 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

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

dejiman

IS YOUR DESTINY ELECETED?

Let's know here

ELECTED DESTINIES

Advertisement: