![]() |
<a href="http://www.dizilerimizden.com" target="_blank">www.dizilerimizden.com</a> . i added my cms
|
|
Great! but I cannot get it to work I've installed it but I'm getting this message
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'database_server' (1) in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 6 Can you point me in the right direction please, Dummies guide;-) |
Interesting.
|
Quote:
Code:
$host = 'localhost'; |
isn't there a way to reference (require once or include) a custom php file that can store the database and password info instead of putting it into the widget itself? Don't want all admins to have that info.
|
Here's an update to this code using vb db class type stuff I learned from migrating another project from vb 3.8x to v4.x. Now the "dangerous" db connection stuff is not available to any who read the code.
My version comments out two query executions you will need if your photopost db is different than your vb db. I have also tweaked the query to fix an issue where the storage cat was different than the cat field and not 0 ( meaning catstore was not used. My code builds on 9 random images in a simple table. Note that I pull the cat out as cat_real and not just cat anymore. I give this code freely to the original author and the community. I will try to mind the thread to help people and/or the OP. Thank you ZippySLC for getting my brain rolling on this. You can see my version working here. PHP Code:
|
Quote:
How/where would I place/define this? PHP Code:
Thanks in advance... |
Quote:
I changed the '9' to '1' as I want just a single random photo showing. Only questions I have are, does the photo change daily or should it be changing with every screen refresh (I expected it to change with every screen refresh but that doesn't seem to be the case). Also - is it possible to make the pulled image a little bigger or define the default width and height (the pulled image is smaller than I'd like for that widget)? |
All times are GMT. The time now is 11:01 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:
|