![]() |
Help Please:- Displaying a CMS Widget in a Pop Up Window
1 Attachment(s)
Hi guys, I've taken on a little project that has taught me quite a lot so far but now I'm a little stuck.
I've written a php direct exec widget and have it displayed on my CMS. It simply takes all the mp3 file names from a given folder on the server and lists them as the $output. I then use the yahoo player to turn them into links. This is all done and working. What I'd like to do is to replace the widget with a link on my CMS that then shows this output in a pop up window. The image below is what it look like so far on my CMS. https://vborg.vbsupport.ru/attachmen...1&d=1317717301 So, I've made a custom template and created the link to show the template page as a pop up, this is shown below. https://vborg.vbsupport.ru/attachmen...1&d=1317717301 So basically what I'm asking is, how do I move the output from the widget so that its displayed in my pop up window. I hope I've explained myself adequately. Thanks for your time. |
I think you'd need to move the php for the widget into it's own php page. You may have to change it a bit and echo instead of putting it into a variable to output (although I guess you can just echo the variable at the end). Then write the javascript for the popup that points to that php page.
|
Thanks for the tip Lynne. I've tried making a custom php page, but I'm struggling positioning the output from my code. The page renders just fine, but my custom php output is at the top of the page . How would I position it under the navbar for example ?
|
That is hard to say since you haven't posted the code. Post the code, using the code tags, so that I may see what is going on.
|
Ok Lynne here's what I've got so far.
I created a template called custom_jukebox Code:
{vb:stylevar htmldoctype} I also created a new php file called jukebox.php Code:
<?php |
Anyone got any ideas please ?
|
As I said before, you need to output your output to a variable. you cannot echo it. You output it into a variable and then register it for use in the template. You are using echo in your php page. ie.....
not: PHP Code:
PHP Code:
|
sorry for being a pain, I understand the difference but I don't know what to add to the template to make it output my variable. Could you expand just a little please ?
--------------- Added [DATE]1317908887[/DATE] at [TIME]1317908887[/TIME] --------------- Lynne, I've done it, thankyou for your help. I also found this which helped me over the final hurdle. https://vborg.vbsupport.ru/showthread.php?t=228078 |
Glad you finally got it. :)
And yes, that is a very good article by Cellarius. |
All times are GMT. The time now is 03:41 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|