Results 1 to 7 of 7

Thread: passing object info without a db?

  1. #1
    Join Date
    Jul 2008

    passing object info without a db?

    hi all,

    i have a question that i am hoping someone on here can answer

    i am working on something at the moment that kind of works but at the same doesn't.

    i have a number of swf files that have objects fed into them via php docs and mainly from a document called exhibits.php - within this document there are sections and objects/exhibits and unique id's for each.

    in the flash movie if one of the php objects is clicked it opens a pop up panel within flash that displays thumbnails/large images and some information about the object.

    so here is my problem, when the php fed flash object is clicked it calls up the document called getObjectInfo.php along with the object id as a suffix - getObjectInfo.php?oid=123 - and the pics and info appear.

    ...but it only reads the info of the one object in the getObjectInfo.php document. regardless of the id etc...

    i have tried adding all of the object details into getObjectInfo.php but it simply stops it working period. i also tried duplicating the getObjectInfo.php adding the specific individual details and then renaming the file to include the object id - getObjectInfo.php?oid=123 this doesn't work either.

    is it possible to add more than one object to the getObjectInfo.php document? without the use of a db - the project originally used a postgres db - i have the dump saved some time ago - but the dump doesn't like the media temple postgres server for some reason - so i am trying to wing it by not using a db - is it possible to do this? or am i doing the equivalent of nailing jelly to a tree?!?

    this is the getObjectInfo.php document content in it's entirity
    PHP Code:
    <response id="730" prevURL="media/gallery/images/main_730.jpg">
    title><lang id="pl"><![CDATA[<strong>title</strong>]]></lang></title>

    short><lang id="pl"><![CDATA[Lorem ipsum dolor sit ametconsectetur adipiscing elitMaecenas vitae sem ipsumsit amet vulputate urnaCurabitur massa auguetempus non pharetra sedfringilla eu lacusLorem ipsum dolor sit ametconsectetur adipiscing elitQuisque pretium fermentum diamet porttitor tellus pretium euAliquam facilisis tempus urna et eleifendFusce sit amet orci id felis sodales porttitorNunc tincidunt hendrerit lobortisNam id neque velitquis commodo eratDonec at gravida miPraesent volutpat eleifend justosed posuere neque pellentesque necPhasellus adipiscing mattis risus non mattisNullam scelerisque lectus et erat vestibulum imperdietMauris et nulla puruseget ornare orciCurabitur blandit dolor in nibh rutrum viverra pretium turpis posuere]]></lang></short>

    description><lang id="pl"><![CDATA[<p><span>Lorem ipsum dolor sit ametconsectetur adipiscing elitMaecenas vitae sem ipsumsit amet vulputate urnaCurabitur massa auguetempus non pharetra sedfringilla eu lacusLorem ipsum dolor sit ametconsectetur adipiscing elitQuisque pretium fermentum diamet porttitor tellus pretium euAliquam facilisis tempus urna et eleifendFusce sit amet orci id felis sodales porttitorNunc tincidunt hendrerit lobortisNam id neque velitquis commodo eratDonec at gravida miPraesent volutpat eleifend justosed posuere neque pellentesque necPhasellus adipiscing mattis risus non mattisNullam scelerisque lectus et erat vestibulum imperdietMauris et nulla puruseget ornare orciCurabitur blandit dolor in nibh rutrum viverra pretium turpis posuere</p><p><a href="http://www.link.com"><b>Visit...</b></a> </p>]]></lang></description>

    gallery><item id="730" ico="media/gallery/images/thumb_729.jpg" file="media/gallery/images/image_729.jpg" src="media/gallery/images/sources/sourceBig_729.jpg" type="jpg">

    lang id="pl"><![CDATA[]]></lang></item><item id="730" ico="media/gallery/images/thumb_730.jpg" file="media/gallery/video/video.flv" src="media/gallery/video/video.flv" type="flv"><lang id="pl"><![CDATA[]]></lang></item><item id="731" ico="media/gallery/images/thumb_731.jpg" file="media/gallery/images/image_731.jpg" src="media/gallery/images/sources/sourceBig_731.jpg" type="jpg">

    lang id="pl"><![CDATA[]]></lang></item><item id="732" ico="media/gallery/images/thumb_732.jpg" file="media/gallery/images/image_732.jpg" src="media/gallery/images/sources/sourceBig_732.jpg" type="jpg">

    lang id="pl"><![CDATA[]]></lang></item><item id="733" ico="media/gallery/images/thumb_733.jpg" file="media/gallery/images/image_733.jpg" src="media/gallery/images/sources/sourceBig_733.jpg" type="jpg">

    lang id="pl"><![CDATA[]]></lang></item><item id="734" ico="media/gallery/images/thumb_734.jpg" file="media/gallery/images/image_734.jpg" src="media/gallery/images/sources/sourceBig_734.jpg" type="jpg">

    lang id="pl"><![CDATA[]]></lang></item><item id="735" ico="media/gallery/images/thumb_735.jpg" file="media/gallery/images/image_735.jpg" src="media/gallery/images/sources/sourceBig_735.jpg" type="jpg">

    lang id="pl"><![CDATA[]]></lang></item><item id="736" ico="media/gallery/images/thumb_736.jpg" file="media/gallery/images/image_73ß∑ß˙6.jpg" src="media/gallery/images/sources/sourceBig_736.jpg" type="jpg"><lang id="pl"><![CDATA[]]></lang></item></gallery>

    this works fine but i can only see this information and can't add any other objects nor change the details to the specific object - how do i add the other objects to this code? any ideas?

  2. #2
    Join Date
    Jan 2009
    The short answer is yes you can manually edit the file or store its pieces to a text file to read into the php file. What you have as your contents for the php file in question is not using any php at all and could just as easily be a text file. The long answer is that there was probably a good reason the developer decided to use a db to populate the file...

  3. #3
    Join Date
    Jul 2008
    thanks for that criterion9, but returning to my original question, how do i add more individual objects to the main getObjectInfo.php file?

    duplicating the id response seems to throw it into a dizzy - and as far as i can see, there are no clues to how it makes multiple objects work.

    i am only too aware of how vague this question is, but what i am trying to work out is how to make this work via multiple objects.


  4. #4
    Join Date
    Jul 2008
    ...is there any way of creating a predefined document for the flash to files to bring in?

    the thing that i am finding hard to get my head around is the that - if one of the 'exhibit' items is clicked it does bring in the title/text/images/video defined as above - but if i adapt a file by adding the suffix php?oid=123 (or whatever the id number is) the flash does call the same .php?oid=123 but not with the specific details - it calls in the object details from my first post regardless of which exhibit is clicked.

    can i not 'force' the info from the predefined document with the manually added suffix .php?oid=123 - would that be possible to do with privileges or something?

    or is there any banchmark tags i need to add to the docs to make it work as if it were dynamically created?


  5. #5
    Join Date
    Jan 2009
    The problem you are having using _GET variables is that there is not PHP in your PHP file so it will always give you the same output. You could rename your file with a .xml extension and get the same results. Are you planning to learn PHP to make this happen?

  6. #6
    Join Date
    Jul 2008
    hi criterion9, thanks for the reply, appreciate it
    ...well, i don't think i can learn the full php methodology in a space of time i have free on this. but i 'do' understand what you are telling me, and realise that i have elemental problems with the document/data in it's basic lack of correct functioning set up.

    ...but that is what i was hoping that someone on here could put me right with - everything else works great (even this doc in theory - it passes the info/images/link to the relevant part of flash) - but i just can not work out what to do to give the document functioning as a proper list of object details - i know that it should be using a functioning db - but i am trying to sort this out as a favour/bail out for a friend of mine, who was left high and dry by the chap who was originally doing this for him - the original db was postgres (something i know little/nothing about) - i have the pgsql dump that my friend had amongst his files - but it doesn't seem to like being pasted into the pgsql db in the same one normally does to restore mysql/php db's.

    ...so long and short of it is i was hoping that either...
    a: someone on here could put me right and show me how to create a list of multiple items in the getobjectinfo.php doc by adding the required tags/script,


    b: someone could tell me how i could edit the main getobjectinfo.php document to include individual object details, rename it to include the relelvant suffix (.php?oid=123) and then hopefully the flash would take that as being the dynamically/db generated file and simply call in the info from that file.

    but it doesn't seem to be a simplistic as that

    is there any standard scripting that i need to add to get either to work as i want/need it to other than < php? > and < /php >

    be grateful for anything you can throw my way

  7. #7
    Join Date
    Jan 2009
    Your best bet is to recreate the db in mysql if that is what you are familiar to. ?oid=blah translates to _GET['oid'] in the script. You are really going to be way over your head trying to get this to work without learning the very basics of php which you can find very quickly with a simple google search. I would recommend you hire a freelancer if this is a time sensitive issue. Many can be found on a number of sites such as getafreelancer, or rentacoder.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.46509 seconds
  • Memory Usage 2,957KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates