vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Logician NEWS: Drag Any Message to Your Main Page (https://vborg.vbsupport.ru/showthread.php?t=39278)

Logician 02-18-2003 07:43 AM

Quote:

Originally posted by gopherhockey
I have a few non-vb hacks installed on our index.shtml file - last 10, recent images (from photopost) - this hack would be nice.. however, I cannot rename my index file to a .php extension as it ruins the other hacks.

Is there a way to run it under an index.shtml file?

I read the threads quickly and didn't see anything like this, which surprises me.

Since the script is in php, technically its extension is suppose to be .php. However using the same method your other hacks uses might work with my hack too (provided that they are in PHP too):
First create a second PHP file with a name like this: "secondindex.php" and use this as its context:

PHP Code:

<?php
include ("newsconfig.php");
echo 
news();
?>

Now you can include this new file in your shtml file as an include like you added your other hacks. Eg.

<!--#include virtual="/secondindex.php" -->

Whether this works or not, I still suggest migrating your index.shtml file to index.php in the long run. Because:
a) If you are on PHP, this is the default syntax and it may help you better in the future with other PHP add-ons.
b) This approach increases server load unnecerrarily. Your file is parsed twice (as PHP and shtml) while only 1 parsing would do the trick if it as .php..

gopherhockey 02-18-2003 07:56 PM

Wow, worked perfectly!

I have a huge debate going on right now (in my head mainly) as I am working to combine a message forum site with 2 other very large related static web sites (.html based only - users requiring front page to modify)

If I switch to .php, I lose frontpage abilities and editing the look of a page becomes a huge pain.. yet inserting code such as this hack works much better. If I switch pages to .shtml as needed I lose out on the things you mentioned.

So far I have about 6-7 nice hacks for my main .shtml page including your news, a calendar, poll, recent gallery images from photopost, user login, recent forum posts ... it is almost looking like a product like vbhome lite, yet retains its original web site look and frontpage capabilities. (not that I'm a huge fan myself of fp) The good thing is that the audience is local and the server is high powered, so I fan afford some amount of overhead until we find a better way.

Thanks for your help!

Logician 02-18-2003 08:18 PM

Quote:

Originally posted by gopherhockey
If I switch to .php, I lose frontpage abilities and editing the look of a page becomes a huge pain..
Do you know that you can safely rename a .html page as .php and the page will work just like it was .html? (But you can now open a php tag in any place of this page and insert php codes). So migrating your .html files to PHP should not be a problem except editing their content and correct the link pointers.

Well this might not apply for .shtml though. You have to deal with its includes too..

Jethro 02-26-2003 02:30 AM

Logician you da man :bandit: w00t 1/2 am hour from reading the first instruction to having the first news item posted up on our test board :smoke:

Just one minor problem (and is probably sitting in the html code somewhere), how do we cut out the gap between news items ?

Figure there must be a <br> tag lurking in there somewhere.

FYI this one works perfectly on 2.3.0.

Do we get to vote for hack of the month? If we do this get's my vote, big up respect to Logician.

Thanks Man.

Will post up url of it working when we get our home pages uploaded (still working on them) :)

Logician 02-26-2003 12:48 PM

Quote:

Originally posted by Jethro

Figure there must be a <br> tag lurking in there somewhere.

You can customize the news look by modifying the "$newstablesample" variable in phpheader.php..

And the <br> is at the end of this part.. ;)

Jethro 02-26-2003 06:52 PM

Excellent ! Thanks once again Logician :thumb:

Jethro 03-02-2003 03:03 AM

Okay this one is installed live. Thanks Logician, very easy to install and use (once you remember to add the tags into the Admin CP) :speechless:

See attached for our first news item ....

Malice 03-10-2003 07:23 PM

I got a problem...
Of course it may be me...

I will exaplain and someone here can possibly clear this up for me.

In a new item.

I post this:

[news]This is a news item[/news]
[intro]THis is an intro, blah blah blah...[/intro]
The rest of the news item....

When I view the message (edit it again) the NEWS tags and the text within it is gone.

Am I lost here...am I missing some functionality here..?

Malice 03-11-2003 10:45 AM

Anyone have a thought about this one?

This problem keeps happening over and over, and the news from the front page then disappears....

Logician 03-12-2003 10:38 AM

Quote:

Originally posted by Malice
I got a problem...
Of course it may be me...

I will exaplain and someone here can possibly clear this up for me.

In a new item.

I post this:

[news]This is a news item[/news]
[intro]THis is an intro, blah blah blah...[/intro]
The rest of the news item....

When I view the message (edit it again) the NEWS tags and the text within it is gone.

Am I lost here...am I missing some functionality here..?

If I understood correctly, when you post news, it is first ok, until you edit it. Then it dissapears, is this correct?

It seems that there is something wrong with Installation STEP 2, 3 or 4. Please check these steps are applied correctly..


All times are GMT. The time now is 11:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01139 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete