isotope 0 Light Poster

I'm afraid my question wasn't that clear (while I hope that isn't something so hard to achieve...).

I hope this explains better my aim:

http://mapofemergence.com/test/MoEv2/pics/snap_graph.jpg

Thanks,
s

isotope 0 Light Poster

@colweb : Simple and elegant, definitely the solution I was looking for.

thanks a lot (and sorry for replying that late),
s

isotope 0 Light Poster

Hi everybody,
there's something I'm struggling with since a few days but I didn't get to any point. Actually I'm not really sure that what I would can be done via CSS, but I'm sure that some of you (surely with a greater experience than mine) can help me have a clearer idea and find some smart solution/workaround.

Here's a test page I'm working on:

http://mapofemergence.com/test/MoEv2/

what I would achieve is having the right div (the green one) someway snapping to the background grid, that is:
when resizing the browser window, I would have the red quads to self organize in the middle area (which I achieved, already) and the green area "filling" the rest of the right side of the page, according to the grid.

Basically, being "a" the grid's quad size, the right green div should have a variable width, equal to or greater than "a", and anyway minor than 2a (in which case it should set back to a width of "a", while having one more red quad move adding to the row).

I'm wondering if it is something which can be achieved with CSS or I necessarily need to use javascript (which would be ennoying as the refresh rate would be slow and flickering, much more than a pure CSS solution).

Thanks for your help,
s

isotope 0 Light Poster

Hi ardav,
thanks for replying but, actually, I was trying to do the opposite.

I would have the footer element at the bottom of the html page, if it's higher than the browser window, while it should be at the bottom of the window if the html if shorter.

In short I would obtain this and this with a same css, while at the moment I could achieve the desired result for each case, only with different css properties ("position:absolute" in one case, "margin" in the other one)

I it makes sense...
Stefano

how about position:fixed. This will keep the element static w.r.t while the page scrolls.

isotope 0 Light Poster

Hi everybody,
I'm struggling with the hoary problem of filling a page with css, even when the content doesn't reach the end of it.
I've been digging through many posts, forum and mailing lists and found hundreds variations of the same few tricks, but didn't find an ultimate one.

Since I wanted to have a very minimal and clean structure I opted for the fake, though effective, solution of styling the html and body so that inner elements seem to get to the end of the page even when they're not.
Here you can find an example:
http://evoke.mapofemergence.com/restyle
Stylesheet here:
http://evoke.mapofemergence.com/restyle/style.css

As you can see the whole structure works pretty fine but I couldn't figure out how to deal with the footer element.
But when the page's content doesn't fill the window (ie. in the index), the footer's margin property isn't enough to have it stuck on the bottom of the page (the footer is the rectangle saying "evoke.mapofemergence is a project...").

At first, I tried giving it an "absolute" position which worked fine for the pages not filling the window.
Example here:
http://evoke.mapofemergence.com/restyle/index1.php
Stylesheet here:
http://evoke.mapofemergence.com/restyle/style1.css
But, with this solution, for longer pages (such as this one) the footer is drawn over the content and not pushed at the very bottom of the containing div.

I hope you can help me out, since I really can't figure …

isotope 0 Light Poster

Why did you define push_array( $array, $in ) { array_push( $array, $in )} ?

I defined that function to represent the structure that I have in my script and to make it easily readable.
Actually within the push_array() function, there are many other things happening. But I would know why the basic code is not working, even if I write it down getting rid of all the rest.
I'm pretty sure the problem is in passing the array's variable to the function. I just would understand why.

I know that the code you wrote works. But I can't avoid the function inbetween.

Thanks for replying and for your time,
s

isotope 0 Light Poster

You start your for loop with i = 0, rather than $i = 0. When you come to push $i onto the array, it therefore doesn't exist.

Sorry, that was my mistake: I copied the code from the wrong file, but I already corrected that, when writing. Otherwise the print_r($array);
would'nt have printed the command five times.

Also, try putting error_reporting on:

ini_set( 'error_reporting', E_ALL );

thanks, that will be useful in the future

Finally, just for simplicity sake in the future... when adding elements to an array, you can do this:

$arrExample[] = 'This';
$arrExample[] = 'is';
$arrExample[] = 'my';
$arrExample[] = 'example';
// Then, if you wanted to print "is" to the screen...
echo $arrExample[1];

Yes I know that method, but it is not working, anyway.
Neither it is working this one:
$arrExample["string"]="other_string";
which, actually, is the one I need, in order to retrieve array values I need later in the script.

When you get to having large arrays, its sometimes easier not to have to provide an index yourself.

As I said above, what I need in the end is an array with named IDs.
Every method for populating arrays is perfectly working putting the code directly into the loop. The problem, I guess, is in the way I have to pass the array from a function to another, which isn't clear to me yet, at all.

Thanks for your time, anyway. I do appreciate that
s

isotope 0 Light Poster

Hi everybody,
I know I'm still a noob with php, but I feel so sad I couldn't manage such a simple (at least apparently) issue.

Here's what I want to achieve, in general:
- I'm reading XML files via simple_xml
- while reading I would populate an array with some strings from the XMLs, if some specific conditions are satisfied
- as I need to read several XML files, I must populate the array from within a function

Easy, isn't it? Unfortunately, not for me...
When I try to pass an array to the function, the array is not recognized.

here's a sample:

$array = array();
	$array[0] = "ciccio";
	$array[1] = "coccio";
	$array[2] = "pasticcio";
	$array[3] = "astuccio";
	
	$n = 5;
	
	function push_array($a,$in){
		array_push($a,$in);
	}
	
	for(i=0; i<$n; i++){
		push_array($array,$i);
		print_r($array);
		echo "<br/>";
	}

and here it is the result:
Array ( [0] => ciccio [1] => coccio [2] => pasticcio [3] => astuccio )
Array ( [0] => ciccio [1] => coccio [2] => pasticcio [3] => astuccio )
Array ( [0] => ciccio [1] => coccio [2] => pasticcio [3] => astuccio )
Array ( [0] => ciccio [1] => coccio [2] => pasticcio [3] => astuccio )
Array ( [0] => ciccio [1] => coccio [2] => pasticcio [3] => astuccio )

:(
Where am I wrong?

Thanx evrybody,
S

isotope 0 Light Poster

Ok, I found how to deal with this.
Keyworld is "namespaces".

A very simple and useful article about this can be found here:
http://www.sitepoint.com/blogs/2005/10/20/simplexml-and-namespaces/
which, on his turn, referes to this:
http://www.w3.org/TR/xml-names11/

I hope this can be useful to somebody else, bye all
S

isotope 0 Light Poster

Hi everybody,
I'm trying to read a Microsoft Word file, exported as microsoft xml, with PHP and simple_xml but I can't figure out how to do it exactly.

Only things I managed to do are:

$tempXml = simplexml_load_file(file.xml);
$xml = $tempXml->asXML();
print $xml;

If I print before the command $xml = $tempXml->asXML() nothing happens. Otherwise the full text (without tags) appears, except by the tags, of course.
But when trying to access the tags with different commands from simple_xml nothing appears to happen.

Is it maybe because of the name of the tags, which always contain ":" (i.e. <w:something>)?
Is there a particular way to acces those tags?
Does anybody of you knows where to find articles about that?

Sorry for such noob questions...
best,
s

isotope 0 Light Poster

Hi MidiMagic,
thanks for replying and for being so clear.
As I said I'm not looking for great compatibility, just because I'm still too noob for that. And I had to publish the website quickly.
I will correct those errors as soon as I can and, at the same time, I would ask you if you can suggest any resource on the web where I can find guidelines and best practices for cross-browser css stylesheets.
Thanks again,
s

isotope 0 Light Poster

Hi cfajohnson and thanks for your reply
definetly not what I wanted, which browser is this? on the ones I checked, they're now working pretty fine...
s
p.s.
I can't test on linux, yet

isotope 0 Light Poster

I managed to solve the problem but I couldn't tell what the problem was, , even if I found where it was...

the menubar under the header had a fixed height of 30px.
I assigned to the text in it:

margin: 0px;
padding: 8px 18px 7px 14px;
font-size: 12px;
font-weight: bold;

this means that text+padding = 27px
but 30px-27px = 3px

First questions:
Where are those 3px gone?
Are those because of the bold text?

the problem was that most (all?) browsers on Win renders the text field one pixel higher than the menubar, compared to browsers on Mac OS.
Now the structure works, even if the bar on Win is 1px higher than on Macs.

I would ask, also: is there a workaround to show the page in all browsers, exactly the same way?

isotope 0 Light Poster

Hi everybody,
I'm trying to restyle the Kubrick css for a blog I'm creating, but I'm quite a noob with css and I cant' figure out why the page's structure appears to be broken in some browsers.

The website is:
http://www.incorde.it/
The css file:
http://www.incorde.it/wp-content/themes/incorde/style.css
For previews I'm using:
http://browsershots.org

I guess full compatibility with every browser would be too hard for me, but I would have the website shown in the same way at least on firefox, with every OS, with ie 6 and 7 on Windows, with Safari on Mac OS X.
Is that too much?

Thank you all,
s

isotope 0 Light Poster

Hi rutaba,
glad to hear you like the idea. Indeed, this topic is a very important one for film companies, above all for those ones dealing with great productions and lots of assets.
If you go further with it, please let me know: I would be happy to help if I can, and to purpose to the company I work in :)

isotope 0 Light Poster

What about a dynamic interface for film productions, which organizes versioning of files and gives the workers access to the latest approved ones, in a transparent way?

isotope 0 Light Poster

Hi everybody and glad, Jimmy03, to hear that this thread can be interesting to you.
I'll keep on threading here about my experiments with rss, then.
Here's my next problem: how can I exclude specific tags while reading an xml file with simplexml_load_file()?
Here's an example (http://me.itgoesgreen.org/rss), where I've added feeds from Direct2Dell.
Now, those feeds contain a lot of tags I do not want, such as <img> <strong> <sup> and styling <div>.
Let's say I just want to keep the <p> tags and have unformatted plain text for all the rest. Is there a way to do that without parsing? Maybe via simplexml_load_file() and if() conditions?
And a very last question (by now, at least):
which is the fastest way to have the text cropped after a fixed number of words or, better, after the closing of the first <p> tag?

Thanks everybody for your attention.
Best,
s

isotope 0 Light Poster

Sorry, I just figured out that the error depends on the css of the page I use to display the rss and the <img> is not actually a picture, but something like a 1x1 pixel marker.

My fault, then. How can I delete the thread? I wouldn't pollute this forum with useless questions...

Sorry again,
s

isotope 0 Light Poster

Hello everybody,
I'm trying to write a php script to read rss feeds. Since I began, I found it is much harder than I expected, because the xml structures are very different, and they need to be interpreted differently everytime.

I'm using

simplexml_load_file()

to read the xml code easily and using if() conditions in order to automate different interpretations for different xml structures. I'm still a neophite to web programming, and I hope this is a correct approach, at least.

I'm having some problems for reading a feed in particular, the one from Greenpeace.
Structure is as follows:

<channel>
  <title>Greenpeace News</title>
  //some more tags I don't need
    <item>
      <title>Armada of activists descends on Kingsnorth </title>
      <link>http://feeds.feedburner.com/~r/GreenpeaceNews/~3/435979702/armada-kingsnorth-coal291008</link>
      <description>A nine-boat protest armada ...&lt;img src="http://feeds.feedburner.com/~r/GreenpeaceNews/~4/435979702" height="1" width="1"/&gt;</description>
      //some more tags I don't need
    </item>
    //some more items
</channel>

As you can see, the image tag is inside the "description" tags.
&lt; and &gt; are used instead of < and >.
What happens when the code is read by my script and reproduced on the page is:
- image is not visible.
- last line of text has a greater lineheight than the others.

Here is the page where you can see the result (it uses a javascript for accordion effect, by dezinerfolio):
http://me.itgoesgreen.org/rss/
(just look at the Greenpeace section, the other ones are working)

the php script I use, is:

<?php
	function curl_session($url){
		$feed = 0; …
isotope 0 Light Poster

Easy, fast, clean and working.
Thank you very much!

isotope 0 Light Poster

Hi everybody, there's a question I would ask about php functions.

I would like to know if it is possible to have optional variable in functions.
Let's say, for instance, that I have:

function my_fun($a,$b,$c){
     various stuff
}

In some cases I would recall the function, inputting values for "a","b" and "c", while in some other cases I would just input values for "a" and "b".

In both cases the function is working, but when I input just two values I have the following error shown on the page, before the code is executed:
Warning: Missing argument 3 for my_fun(), called in...

Is there a way to say that $c is optional, in order to avoid the message to be displayed?

Thank you very much,
s

isotope 0 Light Poster

Hi Vishesh,

I know (and agree) that my solution would be insane for a website, but I'm preparing swf files to be embedded in a pdf presentation, than I'd prefere not to have external link (neither I'm sure that connection via XML would work).

Thanks anyway for your reply.

p.s.
By the way I found a rough method not to have to reassign linkage every time:
1 - batch rename of the images: 0.jpg, 1.jpg, 2.jpg, ...
2 - replace a group of images with the same name, with pre-assigned linkage, in a template file.

Not that elegant, but it does the job :)

isotope 0 Light Poster

Hello Vishesh,
I meant exactly that: pictures embedded in the flash file, as library clips, to be dynamically loaded through actionscript. Sorry for having been inaccurate.

Apparently, I succeded using "BitmapData.loadBitmap()". This is the example I found on Flash Help:

import flash.display.BitmapData;
var linkageId:String = "libraryBitmap";
var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
trace(myBitmapData instanceof BitmapData); // true
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());

What is annoying is that I have to set a Linkage manually, for each bitmap image I have in the library. I've tried selecting multiple files and right-clicking, but the command "linkage..." becomes unclickable. Let's say I have a slideshow with fifty images: I have to right-click and set linkage fifty times!
The new question is: can multiple files' linkage be done in an automated (smart) way? I would just say to Flash that all the bitmaps in the library must have a linkage name equal to the files'names.

bye,
s

isotope 0 Light Poster

Hi everybody,
I would like to create a slideshow template through actionscript, loading images which are embedded in the same swf as the script.
I've tried creating an array and populating it with the names of the images, but I can't find a way to create movieclips containing those images: I know it can be done by loading files from a separate folder, but I would do this with selfcontained images.

Anyone can help?
Thanks in advance and bye all,
s

isotope 0 Light Poster

Thank you all for your kindness and, Serunson, glad for the nick appreciation :)

I' m very happy of being part of Daniweb: I already got useful indications for my work, and I guess it will be an evereyday reference to me.

isotope 0 Light Poster

Hi everybody.
I hope this thread won't be off-topic; I just choosed this section, because the infos I need are still quite general. For further (and more specific) questions, I will open new threads in appropriate sections.

I'm creating a webpage with an online service, which should let visitors to explore a map full (ideally) of resellers with certified green products. Each visitors should be able to: add new markers with specs (address, phone number, etc...), integrate existing markers with new informations and/or comment them.

By now I succeded doing this:
http://www.laboratoriolinfa.com/arpa/trovarivenditori.php
(sorry, the website is Italian only, but it is just to give the idea)

At the moment anyone can add markers. When you click "save", a MySQL database is updated, via php files. The javascript for the GoogleMap reads from the database (via a php generating an XML), and publishes the map with stored markers. To do this I followed several tutorials and, since I'm still a novice, I understood just partially what I did.

Now I need to add the new features and I would ask if anyone nows websites, with tutorials and/or guides which let to do the followings:

1. create a registration and login/logout form (php?), with associated "user" table in Mysql
2. let content's changing with database update (including deleting a marker and the corresponding row in the table's row); such changing opportunities should be available only to registered (and logged) visitors
3. …

isotope 0 Light Poster

Hi ritchie513,
thanks for replying so fast.
I already saw those section; I was asking if there's one where miscellaneus infos (PHP and Java and XHTML) can be asked all together, being less technical.
Again, I would ask just informations about tutorial sites and general solutions, by now.
If there's such a general discuss section, please let me know (I couldn't find it), otherwise I'll do as you said.
Thanks again,
S

isotope 0 Light Poster

Hi everybody, and thanks for being so kind.

I would ask a question: I have many doubts about a web page I'm creating, with some script in it.
I am very bad in programming, then I would ask general informations about tutorials or guides on the web, where I can find the solution to my problems.
What I have on my page is a google map where users can place markers which are saved to a database. Now I would add some option (such as user registration and info window update for markers), which involve XHTML, php and Java.
Question is: which is the best section to submit the thread?

Thank you all. Sorry for being so long

isotope 0 Light Poster

Hi ithelp,
I told my English is weak, then I'm not sure I got you question. I'll try to answer, anyway.

If by "career" you meant "job opportunity": my research is aimed to conceive a scenario where jobs and markets will be redefined, but still feasible.

If you meant to ask whether the research is "time-consistent": time-feasibility is a key-topic of my work. Right now, I'm deisigning a concept for a low-impact pc (though not sustainable, yet) for a next future (around 5 years). In addition, I'm researching to figure out a wider scenario, which involves deeper changings in high-tech industry. This concept is for a later future (within 15-20 years); it would be less feasible by now, though it is fundamental to remind the "direction" towards actual sustainability.

isotope 0 Light Poster

Hi happygeek,
I saw the address I put as a reference was <snipped>.
I read the rules and I saw it might appear as spamming.
I didn't mean to do that, the link was to let a deepening of my work's contents.
Should I write the address, without hyperlink?
Shoud I just say "click on my name to see my blog on green IT"?
Is there any best practice I should follow?
Again, sorry for unintentional spamming.
S

isotope 0 Light Poster

Hy everyone,
I'm so glad (let's even say enthusiast) for having found such a huge community of passionate people, showing in real time the power of social networking and web dynamics!

My name is Stefano and I'm Italian. I became a geek (now upgrading to nerd-novice) around twelve years ago, since I've always been a passionate of digital SFX. Today I work as a product-graphic-web designer and digital content creator (all of these? Yes, but not that much...). I won't bother you further with my professional specs, since you can see my profile on LinkedIn

Since five years I've been working and researching on sustainable development and that has become a kind of mission, to me. And I'm very deeply involved into it. In the last two years I'm working, specificly, on "informatic sustainable development", in search for solutions and ideas to design a sustainable PC and to figure out a "green" scenario for IT development. I created a blog on this topic, which is <snipped>

I would like to start (follow?) some thread on sustainable IT, even if I've no idea whether it could be interesting to this community or not. In any case I would like to receive suggestions about where posting threads (which is the most appropriate section, I mean) about these topics. This place is so big, and I hate being inopportune or messy, writing wrong words in the wrong place... :)

Because I'm a designer, I've always been …