Recent Topics

1 Feb 14, 2006 22:35    

hi there,

i want to add a graph at the end of every post. the graph is automatically generated using jpgraph. For every entry this graph sould directly be added underneath.
include "mygraph.php" should do the job, but i simply do not know where to add it.
thanks a lot .

martin

2 Feb 15, 2006 16:00

You can edit the main skin file by opening /skins/YOURSKIN/_main.php . Of course, YOURSKIN will be replaced by the name of the skin you're using. You could find the line that says $Item->content(); and add your include right below that.

3 Feb 16, 2006 23:10

Oh, that's so nice. thanks for that.
ok, well it works in principle, unfortunately the image isn't displayed. I only see the frame with this broken image icon, and not the graph i am supposed to see. any suggestions why that happens, on a test page it works just fine. same code same call.

4 Feb 16, 2006 23:15

Could you give a link to your blog and to the test page?

5 Feb 16, 2006 23:17

unfortunately not. its currently only on my system. and cannot be reached from outside.

6 Feb 16, 2006 23:31

We could try this. Do View > Source on your blog and on your test page. Compare the relevant parts. Keep in mind that any relative paths for images or other files that are included in the blog, must be relative to _main.php file, not the index.php file.

7 Feb 17, 2006 00:20

Thanks for your instant help. Not it's working but I have absolutely no clue what is going on. In the _main.php I added this code (ok, the abosolute path is not to nice, but i only wanted to know whether the whole thing works.
<?php include("C:/Programme/xampp/htdocs/Grafik/graphMap.php");>
when doing so no picture is shown.
clicking on the properties of the broken image I got the following address

http://localhost/b2evolution/blogs/skins/custom/graphMap.php?_jpg_csimd=1&blog=5&page=1&disp=posts&paged=1

so i assumed that he is expecting the graphMap.php in that folder. So i copied it and voila it works.
This does not seem to be the right way to solve it. Where should I store the graphMap.php? And how would i have to call it with the relative path?

8 Feb 17, 2006 00:30

It still thinks you're giving it a relative url. Try

<?php include("C:\Programme\xampp\htdocs\Grafik\graphMap.php");>

I think Windows likes that kind of slashes.

9 Feb 18, 2006 18:00

ok, that works.

as i have another related question I will just go on in this thread.
The script that I am calling should, use the textual information and turn it into a graphical form.
The problem now is, how do i tell my script which post it should use for its calculation.
Basically, all I need to pass to my script is the content of the post and the id. But I am totally lost here. How do I get my grip around the current post. How can I tell my script which entry in the database it should use for processing.
I think my problem here is a very basis one, so it would be graet if someone just can bring me back on the track.


Form is loading...