![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
PHP Help with widgets
Hey all,
im trying to code something that will echo text and vars into a widgts, while using echo it works but it outputs at the begining of the page instead of inside th wigit it self, could you try and assit me in altering the code so it would work?
No members have liked this post.
|
||||
|
#2
|
||||
|
||||
|
You cannot use echo in the widget. You need to assign all your output to the variable $output.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#3
|
|||
|
|||
|
so how do i assign those to a var and still keep the things i want to disaply inside dynamic?
No members have liked this post.
|
|
#4
|
||||
|
||||
|
Not sure what you mean - like this?
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
||||
|
#5
|
||||
|
||||
|
well i would if i was you 2 ways i see this done
1) create all the var's in the widget as php then register them into a array and instead of using the default template, i would create my own then use that to display the var's. 2) create all the output as lynne said, and you add each line one at a time then in the end you assign it all to output then it displays in the default template but it takes ALOT of repetetive codeing. Personally i do both, but i made the WoW recruitment widget i used option 2, i created it all in php in the widget then at the end i turned it over to $output then it will get rendered on default template, but it requires all formatting to be done in php before $output. ----- Maybe you should download some widgets first and see how they are buildt.. There are several doing what your trying to achive there, just using other data than wow online players..
__________________
My website Evisystems 2013 - I'll be leaving VB, to much of a hassle using it follow the white rabbit, feed! your head
No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 20:20.


