php forum
php mysql forum
php mysql smarty
 
Topic Options
#317180 - 06/08/08 11:25 PM wrapping dynamic content
swebs Offline
User

Registered: 10/13/04
Posts: 29
I just upgraded to 7.2. I use to use the old wrapper which was pretty simple for me. I just created a php file that had a little board stuff at the top to call/include all the necessary functions/files and then I could do all my own PHP stuff and all the users board info was accessible to my scripts. then output what I wanted and then include the board footer.

All the info my script produced was shown in the middle section of the boards. This way I could use the boards authentication to do different things in my scripts. Display.. not display..

I see now after the upgrade that the wrapper does not seem to work the same..

Is there a new upgraded wrapper or do I have to dig in and learn smarty and convert all my dynamic content over.

Here is what I do.

1. User hit a custom page. (list of students/classes)
2. I use to check if the user was registered and what groups they had access to.
3. Based on the group access I could display specific data only. This involved getting their id checking their group and then reading from another mysql db.
4. Then based on all that I would output the page and it would look like it was part of the boards because of the wrapper.

Any suggests would be great, cause this smarty stuff is a bit confusing.

Top
#317181 - 06/08/08 11:37 PM Re: wrapping dynamic content [Re: swebs]
swebs Offline
User

Registered: 10/13/04
Posts: 29
If anyone has an example of accessing another database and displaying content based on the group that the user belongs to on the boards, that would be awesome.

Top
#317182 - 06/09/08 04:36 AM Re: wrapping dynamic content [Re: swebs]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
What I do have is a script that uses ubb sort of as the CMS.

If you call it, it shows a certain post as your webpage inside the ubb wrapper.

You could add code to that script to authentica whether or not to show it, and what post to show.
_________________________

Top
#317184 - 06/09/08 05:38 PM Re: wrapping dynamic content [Re: blaaskaak]
swebs Offline
User

Registered: 10/13/04
Posts: 29
I would appreciate it if you could send me the script to adam@swebs.com

I have to believe someone out there has done something like this.

check the users group if it is in a certain group.
Open/get all the rows from another database table. Sort/display it based on what the user has access to.


Top
#317185 - 06/09/08 05:40 PM Re: wrapping dynamic content [Re: swebs]
swebs Offline
User

Registered: 10/13/04
Posts: 29
Maybe I'm asking the wrong question.

In the script.inc file what is the variable that shows:
User Name
User Login
User Group

Then how do I pass a table of data (html) to be displayed in the template.inc

Top
#317186 - 06/09/08 10:25 PM Re: wrapping dynamic content [Re: swebs]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
What did you upgrade from? The current wrapper posted should work for all 7.x .threads installs. If you are wanting something a bit more involved Ian Spence released a ubb.auth script - should be in the mods forum.
_________________________
- Allen wavey
- What Drives You?

Top
#317189 - 06/10/08 01:11 AM Re: wrapping dynamic content [Re: AllenAyres]
swebs Offline
User

Registered: 10/13/04
Posts: 29
I upgraded from a 6.x version.

Maybe I'm missing it. I looked all through there. Can someone provide a LINK to this ubb.auth code?

Top
#317190 - 06/10/08 02:49 AM Re: wrapping dynamic content [Re: swebs]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 303
Loc: The Netherlands
For me, the easiest is to just write everything inside the ubb framework. The authentication is done for me, and everything that has to be displayed is done for me.

Look at /scripts/sample.inc.php for an example on how to do this.
_________________________

Top
#317192 - 06/10/08 01:12 PM Re: wrapping dynamic content [Re: blaaskaak]
swebs Offline
User

Registered: 10/13/04
Posts: 29
I see the sample.inc but its a bit confusing for me.

Is there a doc somewhere that shows all the variables that are accessible to me. Like $User.Group for $Username $login anything like that?

Also, once I create all the text to be displayed how do I pass that to the template to display? Put it all into some variable and then put {$display} in the template file?

This is why the last wrapper was a bit easier for me. It was just a file that did all the authentication and then I just needed to include(header) and include(footer).

I'm sure the new way is better I just need to get this figured out.

Top
#317193 - 06/10/08 11:51 PM Re: wrapping dynamic content [Re: swebs]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
Once you get the sample.inc.php file setup and the sample.tpl template mentioned (in the variables at the bottom of sample.inc.php) you just call ubbthreads.php/ubb/sample and the page automagically loads for you.
_________________________
- Allen wavey
- What Drives You?

Top
#317194 - 06/10/08 11:53 PM Re: wrapping dynamic content [Re: AllenAyres]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
Oh, and check the topic stickied in the mod forum for "generic page outside the forum" or something like it - a little more complete explanation of how to run something like you want is in there.
_________________________
- Allen wavey
- What Drives You?

Top


Moderator:  Gizmo 
Who's Online
0 registered (), 27 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks