Re: Profile Module - Option Fields

a:3:{i:0;s:33:"Notify me of all selected updates";i:1;s:19:"Notify me only once";i:2;s:48:"Notify me once then disable until I log in again";}

This is a serialized array.
I figured out what the letters "a", "i" and "s" in this serialized string mean:
a = the type. This time it's an array
i = the index
s = the length of the string
You never have to worry about manually converting your array into a serialized string. We have the functions
serialize and unserialize for that.

I hope I make a correct array as an example:

$steve = array(
'Notify me of all selected updates',
'Notify me only once',
'Notify me once then disable until I log in again'
)
$arrayfordb = serialize($steve);

If you want to return the serialized string into a proper array use the following:
[code]
$arrayfromdb = 'a:3:{i:0;s:33:"Notify me of all selected updates";i:1;s:19:"Notify me only once";i:2;s:48:"Notify me once then disable until I log in again";}';
$steve = unserialize($arrayfromdb);


Hope it helps.

Topic


Re: Profile Module - Option Fields

That is an array converted to a string.

Quote:


srmcatee wrote:
Hello,

I just downloaded 1.2.1 and I am trying to setup custom fields for the registration process using the profile module. In the options field for one of the pre-build fields it has these values:

a:3:{i:0;s:33:"Notify me of all selected updates";i:1;s:19:"Notify me only once";i:2;s:48:"Notify me once then disable until I log in again";}

anyone tell me where I can look up what this syntax is? Or what this is called. I've seen this in C# before but I can't recall what it is called or what the syntax is.

Thanks in advance.



In PHP, there are functions to serialize and unserialize arrays/strings. What is it you are trying to do?

Steve Twitter: @skenow Facebook: Steve Kenow

Topic


Profile Module - Option Fields

Hello,

I just downloaded 1.2.1 and I am trying to setup custom fields for the registration process using the profile module. In the options field for one of the pre-build fields it has these values:

a:3:{i:0;s:33:"Notify me of all selected updates";i:1;s:19:"Notify me only once";i:2;s:48:"Notify me once then disable until I log in again";}

anyone tell me where I can look up what this syntax is? Or what this is called. I've seen this in C# before but I can't recall what it is called or what the syntax is.

Thanks in advance.



Re: Source video ?

  • 2010/4/14 15:38:56
  • Will

http://api.jquery.com/load/

This will require you to edit the template a little bit for singlevideo and add an id to the container div.

For example. http://www.impresscms.tv/modules/mytube/singlevideo.php?cid=4&lid=1

if the container div had an id of let's say "video" then you would be able to use load to pull it anywhere else you may want it.

All you need to do is add a new empty container for the video on the page you want to pull it to - let pretened you did so and labeled it "videowrap"

<script type="text/javascript"> <!--//--><![CDATA[//><!-- jQuery('#videowrap').load("http://www.impresscms.tv/modules/mytube/singlevideo.php?cid=4&lid=1 #video"); //--><!]]> </script>


Boom - instant video.

Alternatively - you can use the colorbox library to load video as well - and its actually a really nice outcome.

<a id="vid_window" href="path/to/video#videocontainer">Link</a>


jQuery("#vid_window").colorbox({width:"650px", height:"450px", iframe:true, scrolling:false});


Example: Click "View The Video"
http://mrtheme.com/test/index.php



Re: Source video ?

Have a look at the tutorial using smarty templates in a module, that should give you the idea.



Source video ?

hello,

i wanted to ask, if it is possible to create a page where you only the <($ video.showvideo)> of singlevideo.php?

i have a html source ... and just want to leave a page where the content (<($ video.showvideo)>).


now i create a php page called embed.php and copy the contents of singlevideo.php remove him include 'header.php';
and include 'footer.php';
. but the page goes blank.

greetings.



Re: Instant Zero - Dead Links

Thanks for that, news was a particular concern for me.



Re: Instant Zero - Dead Links

I've uploaded a version of News that is compatible with ImpressCMS (1.63 with 1 small modification in the version file).

While we were granted the ongoing support and development of the Instant Zero modules, the last releases of all the modules broke compatibility with ImpressCMS. We will be updating the Addons site with the most recent versions that are compatible and then begin releasing updated versions.

Steve Twitter: @skenow Facebook: Steve Kenow



Re: Instant Zero - Dead Links

  • 2010/4/5 19:00:56
  • david

If no ones had chance to do this by tuesday night - i'll start this myself



Instant Zero - Dead Links

Hello,

I know the old instant-zero modules were loaded to SVN. The instant zero modules that are in the Addons section still reference the old instant-zero site.

http://addons.impresscms.org/modules/wfdownloads/singlefile.php?lid=104


Can the links be fixed or the correct files placed on a download server.

thank you.



Re: Format video

That's MyTube.

Store the source icons in the folder mytube/images/icon/ and name the icons as: 0.gif, 1.gif, 2.gif, etc.
The number represents the source, see the function xtube_returnsource in the file include/video.php (0=youtube, 1=metacafe, 2=ifilm, etc)

At the end of include/videoload.php add this line:

$video['vidsource'] = $video_arr['vidsource'];


In file templates/xoopstube_videoload.html add the following where you want the icon:
<img src="<{$xoops_url}>/modules/mytube/images/icon/<{$video.vidsource}>.gif" alt="" />



Re: Format video

  • 2010/3/15 14:47:31
  • Will

what module is this?



Format video

Hi,

I want to add the icon for each video eg youtube ...

Example:



thanks.



Re: Another module as MyTube?

Indeed a very nice module! We are now using it at ninan.org.



Re: NewBB Compatible with Impress 1.1.3

What MrTheme means is that NewBB has been transformed into iForum and is now in its RC stage, so almost ready to release.

We just need a lot of testers for this module to be released as a final.

As far as NewBB is concerned. That function unfortunately comes from the Frameworks. I hope it's the only function from Frameworks that NewBB falls over, so it can be easily added to our functions.php and then you do not need Frameworks anymore.

I would go with the iForum though.
Will your site be released soon?





NewBB Compatible with Impress 1.1.3

Hello,

I just attempted to install this module and I am unable to list the module page. Is this module compatible with ImpressCMS? Does it still require the frameworks modification to work?

I get this error when I list the modules page when I attempt to install the module:

Fatal error: Call to undefined function mod_ismoduleaction() in /home/public_html/modules/newbb/xoops_version.php on line 59

I was hoping to not have to include frameworks in my site. Not sure if that is the issue.

Thank you for any information.



Re: Another module as MyTube?

It is a very cool module, and I'm testing it right now for impresscms.tv (where we gather all the video tutorials/howtos etc...).

Altering the prefix function might do the trick transparently, althought it wouldn't be a clean way of doing things.



Re: Another module as MyTube?

  • 2010/2/18 16:53:28
  • Will

nswer would still technically be no right? Wouldn't the module be using the same tables for both clones?

McD has done a bitchin job on this module - there is bound to be some downside. You managed to find it. lol.

I think it would be wise to consider how we structure our tables in future modules...

perhaps instead of

$mytree = new XoopsTree( $xoopsDB -> prefix( 'xoopstube_cat' ), 'cid', 'pid' );


we could do
$mytree = new XoopsTree( $xoopsDB -> prefix( basename( dirname( __FILE__ ) )'_cat' ), 'cid', 'pid' );


etc.

of course that would require them to set the name of the module folder before installing it.



Re: Another module as MyTube?

Hello fiammybe,

Yes, i want to use the MyTube module twice.


thanks.




 Top