Welcome to Geeklog, Anonymous Sunday, October 06 2024 @ 10:45 pm EDT
Geeklog Forums
Portal block in center
Page navigation
Status: offline
sakuny
Forum User
Junior
Registered: 02/05/04
Posts: 29
Quote by ronack: It just means that you can put a static page in your the center. However now with this putting a feed in the center is super.
Now I just tried something and that was to try and put 2 RSS feeds in one center block side by side or in line one below the other. It didn't work for some reason.
Now I just tried something and that was to try and put 2 RSS feeds in one center block side by side or in line one below the other. It didn't work for some reason.
I understand that this script puts and RSS feed in the center block, but if you look at the earlier post by Gaving and see his site at: Ould Sod then you'll see what I mean about putting other blocks in the center. He also uses tables to put multiple blocks. (Did you try inserting the code into tables to get more than one RSS feed?)
On the front page of Geeklog, the Forum block is in the center. I'm assuming this is a staticpage being used somehow.
37
30
Quote
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
I just posted a reply right before your post that has to do with part of your question. Ould Sod has a stack of RSS feed in his staticpage.
Other than that the weather is a link from a weather site. It is not a center block of the GL weather block. All you need is to get the code from the weather site and drop it in.
The random photo is from the gallery. I don't know how he coded it in, but if I had to do such thing, I would use the method posted at this link.
The point is there is no one size fit all code for you to put everything you want in the static page, you have to find a way to do for each individual case.
As for the forum center block, it has nothing to do with the staticpages, it was part of the forum features.
Sam
Other than that the weather is a link from a weather site. It is not a center block of the GL weather block. All you need is to get the code from the weather site and drop it in.
The random photo is from the gallery. I don't know how he coded it in, but if I had to do such thing, I would use the method posted at this link.
The point is there is no one size fit all code for you to put everything you want in the static page, you have to find a way to do for each individual case.
As for the forum center block, it has nothing to do with the staticpages, it was part of the forum features.
Sam
33
46
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by sakuny: On the front page of Geeklog, the Forum block is in the center. I'm assuming this is a staticpage being used somehow.
No, that's a feature of the forum plugin.
Currently, only plugins can display content in center blocks (that's how static pages can be displayed in a center block in the first place ...).
bye, Dirk
32
31
Quote
All,
I appreciate all the followups on this topic, but my question still remains... I'm getting the error message:
Fatal error: Call to undefined function: static_rdf() in /home/jeffand/public_html/staticpages/index.php(84) : eval()'d code on line 1
And can be viewed at:
http://jeffandcrystal.com/staticpages/index.php?page=ESPN
I've set up a static page with the following code within it (20 being the code for the portal block previously created for the non-enabled ESPN RSS feed):
$return = static_rdf('20'); return $return;
I have not allowed the static page to wrap text, I've selected the "execute PHP" (not "execute PHP (return)") option, and not selected the "Exit Type" option.
I've pasted the appropriate code within /public_html/system/lib-custom.php. However, I still can only manage to ge the above mentioned error message. Any thoughts?
Any assistance would be greatly appreciated, thanks!
Jeff.
I appreciate all the followups on this topic, but my question still remains... I'm getting the error message:
Fatal error: Call to undefined function: static_rdf() in /home/jeffand/public_html/staticpages/index.php(84) : eval()'d code on line 1
And can be viewed at:
http://jeffandcrystal.com/staticpages/index.php?page=ESPN
I've set up a static page with the following code within it (20 being the code for the portal block previously created for the non-enabled ESPN RSS feed):
$return = static_rdf('20'); return $return;
I have not allowed the static page to wrap text, I've selected the "execute PHP" (not "execute PHP (return)") option, and not selected the "Exit Type" option.
I've pasted the appropriate code within /public_html/system/lib-custom.php. However, I still can only manage to ge the above mentioned error message. Any thoughts?
Any assistance would be greatly appreciated, thanks!
Jeff.
30
28
Quote
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
Make sure that the code is correctly pasted in. The error says that the static_rdf is not defined. Have you tried "echo static_rdf('20');"?
It is quite unusual for me to see the 'system' folder in the 'public_html' instead of "Geeklog" directory. I see all your system files by going there.
Sam
I've pasted the appropriate code within /public_html/system/lib-custom.php.
It is quite unusual for me to see the 'system' folder in the 'public_html' instead of "Geeklog" directory. I see all your system files by going there.
Sam
34
37
Quote
Status: offline
sakuny
Forum User
Junior
Registered: 02/05/04
Posts: 29
Quote by samstone: I just posted a reply right before your post that has to do with part of your question. Ould Sod has a stack of RSS feed in his staticpage.
Other than that the weather is a link from a weather site. It is not a center block of the GL weather block. All you need is to get the code from the weather site and drop it in.
The random photo is from the gallery. I don't know how he coded it in, but if I had to do such thing, I would use the method posted at this link.
The point is there is no one size fit all code for you to put everything you want in the static page, you have to find a way to do for each individual case.
As for the forum center block, it has nothing to do with the staticpages, it was part of the forum features.
Sam
Other than that the weather is a link from a weather site. It is not a center block of the GL weather block. All you need is to get the code from the weather site and drop it in.
The random photo is from the gallery. I don't know how he coded it in, but if I had to do such thing, I would use the method posted at this link.
The point is there is no one size fit all code for you to put everything you want in the static page, you have to find a way to do for each individual case.
As for the forum center block, it has nothing to do with the staticpages, it was part of the forum features.
Sam
aaah, thanks so much for giving me a more complete understanding to work with.
now i can tinker with it myself and figure out which items i can get to display there.
27
38
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
The code for the static page on theouldsod.com is:
$display .='<div style="float:left; margin:5px; width:45%;">';
$display .= COM_startBlock ('Random Sod Shot');
$display .= phpblock_galleryRandomPhoto();
$display .= COM_endBlock();
$display .= COM_startBlock ('Latest Sod News');
//$display .= phpblock_phpicalendar();
$display .= static_rdf('18');
$display .= COM_endBlock();
$display .= COM_startBlock ('Weather at the Sod');
$display .= '<div class="jetbarweather"><a href="http://www.jetbar.com/cgi-bin/weather/hw3.cgi?zipcode=92116" target="_blank" title="Click for full forcast"><img src="http://www.jetbar.com/cgi-bin/weather/hw3.cgi?config=png&zipcode=92116&alt=hwicc" border="0" alt="Current weather at the Sod."></a><br/>Weather by <a href="http://www.jetbar.com/">Jetbar</a></div>';
$display .= COM_endBlock();
$display .='</div>';
$display .='<div class ="alllists">';
$display .= COM_startBlock ('Tonight at the Sod');
$display .= static_rdf('17');
$display .= COM_endBlock();
$display .= COM_startBlock ('This week at the Sod');
$display .= static_rdf('15');
$display .= COM_endBlock();
$display .= COM_startBlock ('San Diego Sports');
$display .= static_rdf('30');
$display .= COM_endBlock();
$display .='</div><div style="clear:both;"></div>';
return $display;
Also you can do things like showing the user functions block like:
$display .= COM_showBlock( user_block, $help='', $title='User Functions' );
If you find out the block names you can show all sorts of other blocks (not all blocks work though).
Gavin
Yes I am mental.
Text Formatted Code
$display .='<div style="float:left; margin:5px; width:45%;">';
$display .= COM_startBlock ('Random Sod Shot');
$display .= phpblock_galleryRandomPhoto();
$display .= COM_endBlock();
$display .= COM_startBlock ('Latest Sod News');
//$display .= phpblock_phpicalendar();
$display .= static_rdf('18');
$display .= COM_endBlock();
$display .= COM_startBlock ('Weather at the Sod');
$display .= '<div class="jetbarweather"><a href="http://www.jetbar.com/cgi-bin/weather/hw3.cgi?zipcode=92116" target="_blank" title="Click for full forcast"><img src="http://www.jetbar.com/cgi-bin/weather/hw3.cgi?config=png&zipcode=92116&alt=hwicc" border="0" alt="Current weather at the Sod."></a><br/>Weather by <a href="http://www.jetbar.com/">Jetbar</a></div>';
$display .= COM_endBlock();
$display .='</div>';
$display .='<div class ="alllists">';
$display .= COM_startBlock ('Tonight at the Sod');
$display .= static_rdf('17');
$display .= COM_endBlock();
$display .= COM_startBlock ('This week at the Sod');
$display .= static_rdf('15');
$display .= COM_endBlock();
$display .= COM_startBlock ('San Diego Sports');
$display .= static_rdf('30');
$display .= COM_endBlock();
$display .='</div><div style="clear:both;"></div>';
return $display;
Also you can do things like showing the user functions block like:
Text Formatted Code
$display .= COM_showBlock( user_block, $help='', $title='User Functions' );
If you find out the block names you can show all sorts of other blocks (not all blocks work though).
Gavin
Yes I am mental.
34
40
Quote
Status: offline
samstone
Forum User
Full Member
Registered: 09/29/02
Posts: 820
Thanks for sharing you codes, Gavin. PHP just become more and more interesting to me, so I decided to learn it. Maybe I will become good enough to help the GL team.
One question I have, which is not related to GL here, is the use of "echo" vs. "$display" What's the main difference? I tend to run into error with "$display," so I prefer to use "echo." I know this is not a php lesson site, but just can't withhold my curiousity.
I am about to try getting the events list in the center block. I wonder if you have already tried that and ended up using phpicalendar because having RSS makes things easier.
Happy New Year!
One question I have, which is not related to GL here, is the use of "echo" vs. "$display" What's the main difference? I tend to run into error with "$display," so I prefer to use "echo." I know this is not a php lesson site, but just can't withhold my curiousity.
I am about to try getting the events list in the center block. I wonder if you have already tried that and ended up using phpicalendar because having RSS makes things easier.
Happy New Year!
41
34
Quote
drali
Anonymous
just a note:
if you wanna put in the code for the center block as samstone suggests, you need to have 'EXECUTE PHP (RETURN)' selected.
if you want to make it show with just 'EXECUTE PHP'...
then you need teh following code:
can someone explain this to me further? it works yah...but umm...i need more info. i get scared when things work that i dont totally understand.
the good thing about this version, is that it lets me easily add more text to the return via additional echo statements. before if i added teh echo statements, it would show up ABOVE my page header. yah.
thanks TONS for getting this to work tho! i've been trying to get something like this for more than a year now!! you've made my dreams come true. haha.
if you wanna put in the code for the center block as samstone suggests, you need to have 'EXECUTE PHP (RETURN)' selected.
if you want to make it show with just 'EXECUTE PHP'...
then you need teh following code:
Text Formatted Code
echo static_rdf('49');can someone explain this to me further? it works yah...but umm...i need more info. i get scared when things work that i dont totally understand.
the good thing about this version, is that it lets me easily add more text to the return via additional echo statements. before if i added teh echo statements, it would show up ABOVE my page header. yah.
thanks TONS for getting this to work tho! i've been trying to get something like this for more than a year now!! you've made my dreams come true. haha.
29
35
Quote
Status: offline
greenhil
Forum User
Chatty
Registered: 07/20/04
Posts: 51
Thanks for the code from the home page of oldsod
everything is working fine except for i am not getting two columns...i assume it is
$display .='';
i assume i need to add some code somewhere else for this to call properly?
everything is working fine except for i am not getting two columns...i assume it is
$display .='';
i assume i need to add some code somewhere else for this to call properly?
28
28
Quote
Mary Simms
Anonymous
This is very interesting. I tried MyNewsheadlines, but found it rather confusing. Your script works well. I have only one question. How do you limit the amount of feeds to be displayed?
36
26
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Quote by greenhil: Thanks for the code from the home page of oldsod
everything is working fine except for i am not getting two columns...i assume it is
$display .='';
i assume i need to add some code somewhere else for this to call properly?
everything is working fine except for i am not getting two columns...i assume it is
$display .='';
i assume i need to add some code somewhere else for this to call properly?
I think in my style.css file I have the "alllists" class defined to have float:right which give its the two columns.
Yes I am mental.
24
27
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Quote by Mary Simms:
This is very interesting. I tried MyNewsheadlines, but found it rather confusing. Your script works well. I have only one question. How do you limit the amount of feeds to be displayed?
This is very interesting. I tried MyNewsheadlines, but found it rather confusing. Your script works well. I have only one question. How do you limit the amount of feeds to be displayed?
When you create a new feed in the content syndication section of the admin panel you can limit the number of items to display in each feed, is that what you mean?
Yes I am mental.
28
31
Quote
Status: offline
geKow
Forum User
Full Member
Registered: 01/12/03
Posts: 445
I also try to "steal" your idea, but I can't get my rdf feeds running in a centerblock that way. It tells me:
Something is wrong with the blockid that you entered. Fix this. Otherwise there could be issues
* Block is not of Portal Type
Something is wrong with the blockid that you entered. Fix this. Otherwise there could be issues
* Block is not of Portal Type
30
23
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Quote by geKow: I also try to "steal" your idea, but I can't get my rdf feeds running in a centerblock that way. It tells me:
Something is wrong with the blockid that you entered. Fix this. Otherwise there could be issues
* Block is not of Portal Type
Something is wrong with the blockid that you entered. Fix this. Otherwise there could be issues
* Block is not of Portal Type
That is the error you will get if you try to pass the static_rdf function a block id that isn't a portal block. Double check the block id of your portal block and make sure to put that id in the function call here: static_rdf('##'); The ##'s should be replaced with the block id of your portal block.
Yes I am mental.
31
28
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Oh now I understand, yeah you need to create a standard portal block first then uncheck the enabled box, then pass that block id to the static_rdf function. Sorry I didn't realize what you meant.
Yes I am mental.
Yes I am mental.
51
34
Quote
ishmot
Anonymous
Works great on my site! Thank you very much!
34
31
Quote
Page navigation
All times are EDT. The time is now 10:45 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content