![]() |
|
#1
|
|||
|
|||
|
I have tried and tried but cant create this. I have enclosed a zip file (tried to add a zip file but cant to this message) of all the pages that are required to create a module that includes a php file. All I would like to see is my php file that is in my modules folder to be produced onto my add a page within my cmps module in my control panel - to be within my page below the navbar and to have the ability to choose left or right or center of the page. The zip file will show you that I have followed all the instructions as I described in your manual of "Adding a Module That Includes a PHP File" and have added the neccessary information that is required in my php file that is in your instructions- but still the "echo ="hello" shows up on the top of the screen. I know I can easily add the "hello" to a template within my admin control panel under my templates and just type hello in my template to produce it on my page but - I cant edit and add php code in my template in the styles area any php code - since it will produce errors. I would like my php file that resides in the modules area to be the page to have the php code that would produce a hello ie: echo ="hello". If I can see my hello being produced on my new page that I created in cmps from my code from the php file - then I can add the code that I really want to add into my php file in the modules area so that my page will be produce itself wrapped around the vbullentin style.
I hope this is understandable what I have wrote here. I just want to do what the program is designed to do but I cant figure it out - Adding a Module That Includes a PHP File. I can sure use some help here. It may be something stupid that I am not doing- but I am following the instructions. If the instructions are not complete then what is it that needs to be done, do I have to edit the global.php file to make this work - or some other file??? Last edited by -peace-; 08-25-2004 at 09:57 AM. |
|
#2
|
||||
|
||||
|
The code needs to be put into a variable, and then that variable added in the template. So instead, you should have:
$output = 'Hello'; And then add $output to your template. Also, there's no reason for all of the extra code you have in there... Everything between <? and echo "hello"; can be removed. |
|
#3
|
|||
|
|||
|
ok that worked but its limited.
I looked at this and this is the closest match to what I am trying to do. But even this is causing me sql errors most likely due to the external file and its details. http://www.vbadvanced.com/forum/showthread.php?t=1082 SO , with this in mind and its limitations. What I wondering is : Can I restrict a folder thats located in my root to an administrator group thats in vbullentin? if not Can I restrict a file or webpage in my root to an administrator group thats in vbullentin? Anyone who gets to the home page has to log in to view certain forums or threads currently. If he or she has logged in and is in a vbullentin group that I put them into. Then that person can (if rights permit) view a certain page. This is what I want to do.This page is now currently in a folder in the root of the website. I dont want someone to just go up to the address bar and type in the url to the specific file and view it without restrictions and vbuillentin security features. I am aware of windows 2000 rights and I could just restict the folder to a group in the group manager of the server but that would require a double login procedure for the user and users forget passwords all the time. It would be a headache on me to manage it like that. If there is a way I could utilize the username/password cookies within vbullentin and place into my webpage the code that would be like : if member of adminstrator then - view page if not member of administrator then - dont show page Can vbullentin do this? Can any idea here be done? Or will I have to just ristrict the folder within windows 2000 to a specific group? I am hoping for someway to do it with maybe the cookies. Last edited by -peace-; 08-26-2004 at 11:57 AM. |
|
#4
|
|||
|
|||
|
Well I found out how to add a external page to your site.
<?php ob_start(); include("http://hrc/reports/cld/checkloglist.php"); $string = ob_get_contents(); ob_end_clean(); eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('test') . '";'); ?> But now the page is displayed perfectly and the vbullentin is providing the security I wanted. The problem I am having now is on my page I have a link that takes you to http://hrc/reports/cld/checkloglist.php?start=21 by clicking on a next record button. When you click it - it takes you away from the actual page of http://hrc/reports/cld/cmps_index.php?page=test and now there is no vbullentin security. I have tried passing http://hrc/reports/cld/cmps_index.ph...=test?start=21 but that doesnt work. Does anyone know what to do about this? |
|
#5
|
||||
|
||||
|
You'll have to modify the file and change the link to point to your cmps_index.php file instead of the current file.
|
|
#6
|
|||
|
|||
|
Quote:
Here is my code: Sorry for all the code At the bottom you will see this: <td><a href="checkloglist.php?start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td> I changed it to <td><a href="cmps_index.php?start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td> Doesnt work - no records show. There are approx 500 records in database and 20 show at a time, thats why I hit the nextpage buton and it points to this other link. Quote:
Last edited by -peace-; 08-26-2004 at 04:38 PM. |
|
#7
|
||||
|
||||
|
Try this instead:
<td><a href="cmps_index.php?page=test&start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td> |
|
#8
|
|||
|
|||
|
Quote:
http://hrc/reports/cld/cmps_index.ph...=test&start=21 But no records show. I am going to try and attach 3 pics for you to see two with records and one without going to this location. |
|
#9
|
||||
|
||||
|
Did you just rename the page to cld? If so, then you'll need to change the 'test' part in that code I gave you to 'cld'.
|
|
#10
|
|||
|
|||
|
Quote:
I changed it to cld and - almost had a heart attack cause there was info from the database I looked at it and it was the original 1 - 20 records. I hit the button again and still the records were 1 - 20. hmmmm Nice try Brian and I really do thank you for your efforts in this. There has to be a way to do this. Its just passing a url. Any other ideas??? I am willing to give anything a shot - it took me a lot of research to get this were I am right now and would like to see this work. Also just on another note - my time is off by like 5 hours and I change it in the control panel but nothing happens. I mean I have tried all setting on this and none works. But thats nothing I to worried about at the moment. I am more concerned about choosing more records out of the database. and showing it on my screen. This is basically a page in a page. If I go to the page which is http://hrc/reports/cld/checkloglist.php it comes up and works fine. I am going to attach 2 pages of the external files in action. Last edited by -peace-; 08-26-2004 at 07:09 PM. |
|
#11
|
||||
|
||||
|
/forum/includes/vba_cmps_include_bottom.php
Look for: // Process Active Modules Above that add: globalize($_REQUEST, array('start' => INT)); Let me know if that helps.
|
|
#12
|
|||
|
|||
|
Quote:
I added the extra code but still it goes to the other webpage and show the 21 - 40 records but now I am out of the cmps page. I view the page at http://hrc/reports/cld/cmps_index.php?page=cld and when I click on the next records it takes me to http://hrc/reports/cld/checkloglist.php?start=21. Is it possible to have a dynamic page in a dynamic page and perform a function within the dynamic page thats embeded within a dynamic page? Because I feel thats what I am trying to do here. I mean the internal page (checkloglist.php) in my body of the page (cmps_index.php) has code built within its page (checkloglist.php) to perform functions and when those functions are passed they are passed to (checkloglist.php). This would be simpler if I could capture the cookie of the user viewing the page. I mean currently the cld page is restricted to the accounting group that I created in my control panel - so no one even if there registered can view this page unless they are part of the boards accounting group. Thats the key that I am trying to accomplish here. If I could place within the header of my checkloglist.php file the code for checking a cookie then I could just run thoses pages by themselves without haveing to embed it within a cmps page, if you can see what I am trying to say. The users are in the forums database and if there is some external code that will validate them to view a page like you have now - it validates the cmps page- what validates the page? Where is the cookie code and is it usable within php or html? If I could grab that code from the cmps page or wherever its residing then I could place that code in a header of my external pages to verify the user viewing thoses external pages. Can this be done?? Last edited by -peace-; 08-27-2004 at 08:39 AM. |
|
#13
|
||||
|
||||
|
Did you make sure to change "checkloglist.php" everwhere in the file?
Validating users through a cookie and such would probably be a little harder and not as secure as running it straight through vBulletin. |
|
#14
|
|||
|
|||
|
Quote:
Are you saying all the code in checkloglist.php thats has checkloglist in there needs to be changed to cmps_index.php? Even the statement that says <form action="checkloglist.php"> if I use <form action="cmps_index.php"> how will this work? Sorry I am confused -------------------------------------------------------------------- Ok I replaced checkloglist.php with cmps_index.php in the checkloglist.php and the output is blank .I am attaching a screen shot for you Last edited by -peace-; 08-27-2004 at 01:53 PM. |
|
#15
|
|||
|
|||
|
I logged in as another person from a workstation and tried to go to the page in question cmps_index.php and the first page comes up but when he hits the button for the next records this your are not authorized page comes up. He is authorized though to view it within the control panel
Pic is included. Last edited by -peace-; 08-27-2004 at 03:47 PM. |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Porting PHP-Nuke Modules: Can it be done? | Sovereign | Add-On Modules & Modifications | 4 | 04-08-2005 05:14 PM |
| Modules displayed by user choice? | Delirion | Add-On Modules & Modifications | 12 | 09-21-2004 04:03 PM |
| edit modules | -peace- | Troubleshooting / "How do I..." Questions | 8 | 08-13-2004 12:47 PM |
| Download Modules? | MickeyD | Add-On Modules & Modifications | 3 | 07-19-2004 03:26 PM |
| Active modules not showing | contramontanum | Troubleshooting / "How do I..." Questions | 3 | 06-21-2004 01:43 PM |