Previous Thread
Next Thread
Print Thread
Rate Thread
#317180 06/08/2008 11:25 PM
Joined: Oct 2004
Posts: 14
User
User
Offline
Joined: Oct 2004
Posts: 14
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.

Sponsored Links
Joined: Oct 2004
Posts: 14
User
User
Offline
Joined: Oct 2004
Posts: 14
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.

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
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.

Joined: Oct 2004
Posts: 14
User
User
Offline
Joined: Oct 2004
Posts: 14
I would appreciate it if you could send me the script to [email protected]

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.


Joined: Oct 2004
Posts: 14
User
User
Offline
Joined: Oct 2004
Posts: 14
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

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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?
Joined: Oct 2004
Posts: 14
User
User
Offline
Joined: Oct 2004
Posts: 14
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?

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
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.

Joined: Oct 2004
Posts: 14
User
User
Offline
Joined: Oct 2004
Posts: 14
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.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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?
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)