Skip to content

[random video/image] can't seem to get this to work.. do i have the wrong formatting??

So after reading numerous thread posts and playing around with different scenarios..  I came to the conclusion that using specific formatting within articles will help with randomizing images/videos..  

so here is what I did..

The articles are randomly selected using the %spinfolder attribute within a directory..

and for each of the article I have the following attribute as the very first line in the article

{%spinfile-C:\Users\Administrator\Documents\GSA Campaigns\Trump Ocean Club Rentals\panama real estate youtube video - one line each.txt%|%spinfile-C:\Users\Administrator\Documents\GSA Campaigns\Trump Ocean Club Rentals\trump panama images file.txt%}

The above basically randomly chooses "ONE LINE" of a file from either a video URL or Image URL..

formated video text file:

or image text file:

in essence, randomly choosing a video or image to place on any submitted article...

This works great (except for that fact that it is always in the same place)..   

The PROBLEM..   am I formating these URLs wrong???

Because what I get on ALL submitted content is JUST the URL..  and not the actual video or image??

Any Help would be appreciated..


Comments

  • AlexRAlexR Cape Town
    Your format is wrong. In your .txt files you need to have the formatting like:
    <img src="filepath" height="200" width="200"> so when it pulls in a line it grabs the whole line correctly. At the moment you just import a raw URL! 
  • @alexr, yes that is exactly what it is doing pulling in a raw URL..

    I hate to ask, can you be more specific about the formatting...  using the above code..   I am NOT a developer whats so ever but can talk pseudo code..  :-) 

    I see the above <img src="filepath" height="200" width="200"> is for images...  

    so can I assume I put that as follows:

    {%spinfile-C:\Users\Administrator\Documents\GSA Campaigns\Trump Ocean Club Rentals\panama real estate youtube video - one line each.txt%|<img src="filepath" height="200" width="200">%spinfile-C:\Users\Administrator\Documents\GSA Campaigns\Trump Ocean Club Rentals\trump panama images file.txt%}

    What about the pulled video URL formatting???  because the video also pulls a raw URL??

    thanks in advanced,



  • read this guide from S4nt0s to know how to format img/vid correctly and combine it with the macros you know of already.

  • MrXMrX Germany
    This pseudo code ist just simple HTML, what you do need to display an image or video.
    Like when you post a video on your own homepage, you take the embed code from youtube for example.
    So you might use something like:
    {<img src="%spinfile-C:/XXX/images.txt%">|<iframe width="420" height="315" src="%spinfile-C:/XXX/videos.txt%" frameborder="0" allowfullscreen></iframe>}
    BUT, not all sites are accepting videos and you might end up with some weird lines of code in your article because they escape your try to post content via HTML code. Maybe someday Sven finds some time to code a workaround like %image-from-folder:C:/XXX% which pulls the images URL and either interpret as BBCode, HTML or whatever the target sites wants us to use.
  • <Maybe someday Sven finds some time to code a workaround like %image-from-folder:C:/XXX% which pulls the images URL and either interpret as BBCode, HTML or whatever the target sites wants us to use.

    i think this is already possible and SER will change the format accordingly. it needs to be defined in the scripts though (e.g. "html to bbc=1") and if you notice wrongly formatted articles than collect them and send Sven those examples so he can improve the affected scripts if possible.
  • MrXMrX Germany
    they were some problems on using HTML in #trans but he fixed it :)
Sign In or Register to comment.