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

Master Zonk

#3020
could somebody please tell me why the following php code in a custom php block works fine on the portal page and in preview but not on a custom page or anywhere else in the forum.

$x = rand(1000000, 70000000);
$m = date(n);
$d = date(j);

$sum = $m + $d - 1;
$mod = $sum % 5;
$bingo = 7 * $x + $mod;
print "<b>$bingo</b>";


This is the error I get
Quote8: Use of undefined constant n - assumed 'n'
File: C:\wamp\www\web\forum\smf\Themes\As_theme\MessageIndex.template.php (portal_below sub template - eval?)
Line: 2Database Error: Table 'products.smf_sessions' doesn't exist
File: C:\wamp\www\web\forum\smf\Sources\Load.php
Line: 2298

I can put this code into a custom php page and it works, just doesn't work in a block.
This isn't the only code that I have problems with....but this is a simple math problem...what gives?

SMF 1.1.10
Portal 2.3.1


Thanks
Lead me, follow me, or get out of my way.
--George S. Patton Jr.

[SiNaN]

What's n and j you are using with date()? It should either be 'n' and 'j' or $n and $j.
Former SMF Core Developer | My Mods | SimplePortal

Master Zonk

This is where I say 'duh'
the weird thing is that now my shoutbox is broke

Thanks
Lead me, follow me, or get out of my way.
--George S. Patton Jr.

Master Zonk

hummmm....seems my mysql query in a different block is hosing all the other blocks for some reason
Lead me, follow me, or get out of my way.
--George S. Patton Jr.

worm82075

Just updated from 2.0.5 to 2.3 and I gotta tell ya I'm just blown away by all the bells and whistles this puppy has. Every single thought i ever had for improving this mod has been realized and then some. Fantastic job on this mod guys and thank you all so much (especially you Sin) for offering such premium code to us SMF users for free.

Normally I do not bother such generous individuals as yourselves with problems that I could probably work out on my own but i don't have a large amount of time on my hands these days so a direct answer or even a point in the right direction would really help me out.

Ok here is the problem. Uninstalled 2.0.5 without a hitch(all tests successful) and installed 2.3 with same ease, turn key really. With some minor tweaking I got all of my old blocks working again with the exception of the poll block.

I get the following error in that block and all blocks after don't load.
Database Error
Unknown column 'p.ID_BOARD' in 'field list'
File: /nfsn/content/thewormhole/public/forum/SSI.php
Line: 908


Any idea what could be causing this? Do I need to update to 2.3.1 and if so can I do that without uninstalling 2.3?

Edit:By the way I am running 1.1.9

[SiNaN]

Poll block fetches data using the poll functions in SSI.php file. You seem to have edited the code in SSI.php and there is a problem with the query. If you don't have custom edits in SSI.php file, just replace it with a fresh one from SMF package. Otherwise you could attach it here so that we can check it.

Although it won't help with this issue particularly, I would suggest updating to 2.3.1. You won't need to uninstall 2.3 version; just install 2.3.1 package on it.
Former SMF Core Developer | My Mods | SimplePortal

Mu3rt3

Hi! I have trouble uninstalling this simple portal mod.  :o

I just click uninstall and it does give blank page with 500 error on apache log's nothing on smf error log's.

I can uninstall other mod's just fine.  ;)

"GET /index.php?action=admin;area=packages;sa=uninstall;package=SimplePortal_2.3.1.tar.gz;pid=48 HTTP/1.1" 500 -

smoooth

I added EVERYTHING and nothing changed?

TheListener


worm82075

#3029
Edit: Fixed it - thanks for point in the right direction. Don't know how it got there but the unknown in the error was the culprit.

edit2:

Suggestion for Future Versions

1-Make the poll block so you can specify a board to select random polls and (like the view topic link) another link to view another random poll. This way i can limit the polls displayed to Official site polls the other link will cycle through the other polls on that board.

2- Add an option to use message icons for recent posts and topics

Diagram

Weird.
After using SimplePortal Shoutbox my forum ended up in a 500 internal server error.

Any help?

smp420

I installed Simpleportal 2.3.1 on smf 2.0 Rc2 it works fine but there is no copyright it installed without errors the site is www.teenshangout.net
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

aussieherps

#3032
Have installed on rc2 with one error that I parsed in but where do I get the settings for this.
Have woked it out but now wish to chang the home button to say shop and the forum button to say home.
Which file will I find this code in?
http://aussieherps.com">snakes lizards spiders turtles and much more

txcas


tfs

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

smp420

It works on RC3 actually I think most mods do just click on advanced at the bottom of package manager and emulate rc2.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

lc62003

Quote from: smp420 on March 08, 2010, 10:15:13 PM
It works on RC3 actually I think most mods do just click on advanced at the bottom of package manager and emulate rc2.


I can echo that, as installed on a live test forum.   8)

[SiNaN]

SimplePortal 2.3.1 works perfectly fine with SMF 2.0 RC3. Just emulate the Package Manager version to SMF 2.0 RC2 and you can install and use it without any issues.
Former SMF Core Developer | My Mods | SimplePortal

Maserati

Can someone help me:

I need prrety urls for this portal, just to forum show me mydoman.com/forum not mydomain.com/index.php?action=forum...

Also can someone tell me where i can remove from articles block that part: Read more and comment?

Farjo

Quote from: [SiNaN] on March 09, 2010, 06:15:22 AM
SimplePortal 2.3.1 works perfectly fine with SMF 2.0 RC3. Just emulate the Package Manager version to SMF 2.0 RC2 and you can install and use it without any issues.

Thanks for the advice SiNaN it works :)

ps I had to hunt around to see what "emulate the Package Manager version" means. If you're the same see here  ;)

Advertisement: