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

   wrapping dynamic content to Del.icio.us Add to del.icio.us
  Digg wrapping dynamic content Digg it
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
Member

Registered: 02/25/07
Posts: 285
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: 25408
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
Member

Registered: 02/25/07
Posts: 285
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: 25408
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: 25408
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 
Top Posters Last 30 Days
AllenAyres 18
Gizmo 12
sirdude 6
GEN 3
tackaberry 2
Philipp 2
willing 2
Who's Online
0 Registered (), 37 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
[7.2.1] - Naked shoutbox
by Iann128
08/22/08 07:27 PM
Nice Ajax Chat
by M4D
08/21/08 10:02 PM
51-card NVIDIA folding rig cranks out 265,200 ppd
by AllenAyres
08/13/08 10:10 PM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.x] AddThis - Social Networking
by Gizmo
08/01/08 01:30 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
Newest Members
Claus1, welcomeback1, Paug, Tim Keating, anscers
13325 Registered Users

 

 

 
fusionbb message board php hacks