News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Small Portal

Started by Jerry, January 29, 2005, 04:02:52 AM

Previous topic - Next topic

Jerry

I am writing a small portal since I couldn't find any I wanted to use. One thing I am having troubles with is sub-actions. (;sa= in the url, I assume that stands for sub-action) I have looked at some of the existing ;sa= setups, and can't seem to figure it out. Can anyone explain how to use sub-actions to me?

Thanks!


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Jerry

Finally got it, took a bit of searching throughout files though :-X


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Trekkie101

#2
Jerry it looks like IPBdynamic and can i ask when are you going to release it, will it be a package style install or will I have to modify the files?

Huh?
Huh?
Huh?

PLEASE Release it

whats the status?
Why isnt it on the intgrations list?

Dont ask guys, its a private joke between me and jerry

Pause

Quote from: Trekkie101 on January 29, 2005, 07:23:51 PM
Jerry it looks like IPBdynamic and can i ask when are you going to release it, will it be a package style install or will I have to modify the files?

Huh?
Huh?
Huh?

PLEASE Release it

whats the status?
Why isnt it on the intgrations list?

Dont ask guys, its a private joke between me and jerry
You're just impatient lol
"You and me, inside that box, now." - The Doctor

Bite Fusion
Fusion Web Network
VG Fusion
Wrestling Fusion

Jerry

Trekkie was just kidding, I found out the sub-actions... but now if I enter a invalid sub-action, it gives a cannot load error. Anyone know how to fix that? :-X

see:

http://www.raclan.org/forums/index.php?action=portal;sa=roster

and here is a sub-action that doesn't exist.

http://www.raclan.org/forums/index.php?action=portal;sa=omg_yay


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

[Unknown]

It's a bad idea just to pass the 'sa' to 'sub_template' - you should validate it.

-[Unknown]

Jerry

alright thanks [Unknown] :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Jerry

if (isset($_REQUEST['sa']))
{
$page = array(
      '1' => 'roster',
      '2' => 'enlist',
      '3' => 'news'
      );

if (isset($_REQUEST['sa']) && in_array($_REQUEST['sa'], $page))
{
  $sub['name'] = ucfirst($_REQUEST['sa']);
  $sub['page'] = $_REQUEST['sa'];
} else {
  $sub['name'] = 'Error';
  $sub['page'] = 'Error';
}

   $subaction = $sub['name'];
     $context['page_title'] = '' .$context['page_title']. ' - ' .$subaction. '';
     $context['linktree'][] = array(
             'url' => $scripturl . '?action=portal;sa=' .$sub['page']. '',
             'name' => '' .$subaction. ''
             );

   $context['sub_template'] = $sub['page'];
}
probably not the best way... but it seems to work. :-\


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

ltabdiel

I am interested in this protal also, it looks like it has great potential, and it looks like it has a good layout.

Jerry

it uses SSI for almost almost everything. But I will be willing to put it up for download once it is complete.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

ltabdiel

ok sounds cool, I will check it out and see what I can do to it ;)

AmphetaMarinE

Holy crap....
Now that is impressive....

Maybe I should completely drop learning to skin mambo and work on something like this....

I had no idea a portal could be so complete using just ssi.php....
Looks awesome mate...
Could you possibly post links to the posts which you found most helpful in designing this??
(I haven't even heard of subactions...)

Cheers,
Amph.
Sign Here: X..........................................................................................

Jerry

Here are a few links:
[README] SSI Faq's
How to create custom 'action' (not exactly how I learned to make an action, but same meathod ;))

I did use the News Archive a bit modifired appearance.

I am also going to put the core of this portal up for download, it will have no admin panel. So coding will be required!


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

AmphetaMarinE

Thanks Jerry
That should help heaps.

very much appreciated. :)

Cheers,
Amph
Sign Here: X..........................................................................................

AmphetaMarinE

OK,
I'm pretty much stumped....
Maybe I am gunna hafta go learn php properly...
Until now I had gotten by with pretty much modifiying existing code...
But writing my own from scratch???
Much harder than I had anticipated.

Thanks anyway Jerry, but I will have to wait until either you release your portal"ish" mod, or I understand php properly.

Cheers,
Amph
Sign Here: X..........................................................................................

ltabdiel

yeah, I will try to build an admin panel for it when you release it and then I can release that, have you released it somewhere else yet?

Jerry

I have not yet released it, still working on it. Went from a small project to a bigger one :P integrating it better into my forum.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

ltabdiel

ahh sounds cool, can't wait to seee what I can do with it, or screw up rather... :P

Midgard


Gandalf

man i just want to tell you GOOD Luck :D
and this topic must be renamed to Big Portal not small portal :D
Siemens-mobiles.org Visit it and you won't regret it :D

Advertisement: