vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Any-forum News hack (https://vborg.vbsupport.ru/showthread.php?t=33314)

JJR512 02-13-2002 06:20 PM

Sorry, please ignore the test forum for now. If you want to see the hack in action, please look at it on my production forums: http://forums.jjr512.com/homeindex.php

(This hack on the test forum is not currently working due to being in the middle of testing of something that isn't finished yet.)

squawell 02-13-2002 06:29 PM

so u mean the hack didn't finish yet~~

and i got that is normal!!

pdaGuy 02-13-2002 07:09 PM

JJR512,
I'd like to suggest something...
Wouldn't it be better if the "Headbits" didn't show the threads that are "News Items" too? I mean, what's the point of showing them in two places on the same page? What do you think?

P.S. Any idea on the include statement? (see post #119)

JJR512 02-14-2002 01:37 AM

[QUOTE]Originally posted by squawell
so u mean the hack didn't finish yet~~

and i got that is normal!!

pdaGuy 02-14-2002 01:53 AM

JJR512,
Thanks for considering my request and I look forward to see what you?ll come up with on the new version ;)
Is there any chance that you or someone else could let me know how to insert extra PHP code on the homeindex.php page?
For example, I want to include a separate Poll script that I found here, but the installation instructions say that I must add the following in order to have the Poll on my site.

[QUOTE]
<?php require "./booth.php"; ?>
<?php
echo $php_poll->poll_process(1);
?>

JJR512 02-14-2002 09:22 PM

You cannot add PHP code to templates. (Unless it's the phpinclude template, of course.) You must add the code to the file; in this case, homeindex.php file.

Because the file is entirely PHP to begin with, you can strip the PHP opening and closing tags, so you are left with these two lines:
require "./booth.php";
and
echo $php_poll->poll_process(1);

Without having read the instructions for that hack, I would assume you should put the require line below the line that requires global.php, and the echo line...well, I don't really know where to stick that, honestly. I think an echo statement will work in this file because all the HTML is generated by templates, and the output of the echo statement would need to go wherever in the HTML that you want it, which isn't possible this way. I think wherever you stick that echo statement in the homeindex.php file, the output will just end up at the top of the page, above the header and everything.

pdaGuy 02-15-2002 02:38 AM

Well.... I did what you said but it didn't work :(
When I added the echo... I received
[QUOTE]echo (0);

pdaGuy 02-16-2002 12:05 AM

Just so you know.. I find out how to include the poll script ;)
Everything needed to go on the phpinclude ;)

voogru 02-21-2002 05:41 PM

i want to be able to include the news hack on my non-vB page this is how i have it setup

main site is in the public_html/ folder
and my forums are in the public_html/forums/ folder

now what i want to do is simply modify my index.php to get the news and make working links to the posts. i dont know how to include it and keep my normal page up.

basicly heres what im looking for, this is a IMAGE EDIT just for your info :)

http://www.voogru.com/images/homepage.jpg

i attached my index.php if someone could lead me in the right direction that would be great :)

-voogru

TECK 02-22-2002 03:34 AM

i posted here on this thread how to make homeindex.php your home page. ;) search through..

timbob 03-03-2002 07:17 AM

Is this wonderful piece of software ready for full release yet?

ForKmaN 03-03-2002 08:37 AM

Ok I want this hack..exactly which link do I get :P

is it fully out yet?

juno 04-05-2002 08:37 AM

JJR512,
Could you send me the latest version? I'd like to try and convert this over to vbportal.

John 04-06-2002 12:40 AM

I'm confused. I can't access newspost.php because I don't have the rights - even though I'm the admin (of course). And homeindex.php is nice, there's a news bar down the right hand side. But isn't something supposed to go in the middle?

<newbie>

Help?

Okiewan 04-10-2002 01:06 AM

[QUOTE]Originally posted by nakkid
i posted here on this thread how to make homeindex.php your home page. ;) search through..

wintz 05-13-2002 04:36 PM

Can anyone let me know if/where i can get this hack or one that dose the same thing it`s just what i have been looking for thanks

Lionel 06-30-2002 03:13 PM

if there is an image as attachment is there a way to also have it displayed on homeindex, as a thumb, using php resize function?

BigJohnson 07-15-2002 09:06 AM

I can't get this to work for my site. My board is at www.website.com/forums/
and i want to put the homeindex at www.website.com

Not at /forums/

How would i go ahead to do this. Can someone please tell me in detail because i am not to good at this. Thanks

JJR512 07-15-2002 06:21 PM

I know I've never been able to get it to work outside of the forums directory, and I don't recall anyone else saying they did it, either. So that's where I kept it. At first, I changed my root index.html to instantly redirect to homeindex.php. Eventually, I just moved my entire forums to the root web level.

Lethal 07-16-2002 05:43 PM

does this work on vb 2.2.6?

JJR512 07-16-2002 06:40 PM

It should. It does for me, and I don't remember having to modify it.

Lethal 07-17-2002 04:25 PM

thank you

Lethal 07-18-2002 06:39 PM

This is a great hack. I have a little problem. I have 5 different sections in my site and each of them have a different news forum. Is it possible to use this hack and have the news from each news forum show up and their respective index pages. Meaning I will need to have basically a different homeindex.php for each index page. Is something like this possible for this hack? Also, why is the news posted on the right sidebar and not in the middle? I hope this is possible to do this. Maybe not with this hack but maybe there is another one here that I haven't found yet. I tried pluhnews but i didn't like that because I couldnt' get that to use the current style of my board and I had to edit it with html and what if I have a different style then the colors won't match and stuff like that. Help please.

Tarion 07-18-2002 08:24 PM

i think i found a Bug:

when i make a new thread, mark this thread as news and would start a poll, i got a with page, i fgured it out that the poll function now work but only when i don't try to do both makr as news and start a poll.

Any idears or is this only my problem???

I use VB 2.2.4

BigJohnson 07-19-2002 03:04 AM

I get this as an error please help

Warning: ChDir: No such file or directory (errno 2) in /usr/local/psa/home/vhosts/url.com/httpdocs/index.php on line 6


[QUOTE]Originally posted by Nakkid
01. open homeindex.php. place:
PHP Code:

chdir("/home/yoursite/forum"); 

above:
PHP Code:

require("./global.php"); 

02. find:
PHP Code:

$editlink="<a href=\"newspost.php?s=$session[sessionhash]&action=editnews&newsid=$gnresults[newsid]\">(edit this news item)</a>"

and add in front of it your site location:
PHP Code:

$editlink="<a href=\"$bburl/newspost.php?s=$session[sessionhash]&action=editnews&newsid=$gnresults[newsid]\">(edit this news item)</a>"

03. replace all { imagesfolder } code with your actual folder location (http: //www.yoursite.com/forum/images) or simply edit the imagesfolder variable to point to the full url.

04. find:
PHP Code:

$pagenav getpagenav($totalnews,"homeindex.php?s=$session[sessionhash]&perpage=$perpage"); 

and replace the homeindex.php with the name of your file, for example index.php.

**************************
01. open newspost.php. find the code:
PHP Code:

eval("standardredirect(\"".gettemplate("redirect_postnews-done")."\",\"homeindex.php?s=$session[sessionhash]\");"); 

and replace homeindex.php with the url of your main page (or use the variable $homeurlindex.php). this will make it look like:
http: //yoursite.com/index.php

02. find:
PHP Code:

eval("standardredirect(\"".gettemplate("redirect_editnews")."\",\"homeindex.php?s=$session[sessionhash]\");"); 

and replace homeindex.php with the url of your main page (or use the variable $homeurlindex.php).

03. find:
PHP Code:

  if ($deletenews=="yes") {
    
$DB_site->query("DELETE FROM news WHERE newsid='$newsid'");
    eval(
"standardredirect(\"".gettemplate("redirect_deletenews")."\",\"homeindex.php?s=$session[sessionhash]\");");
  } else {
    eval(
"standardredirect(\"".gettemplate("redirect_nodeletenews")."\",\"homeindex.php?s=$session[sessionhash]\");");
  } 

and replace homeindex.php with the url of your main page (or use the variable $homeurlindex.php).

BigJohnson 07-20-2002 01:00 PM

Can someone please help me. Read above. PLEASE@!!!!!


All times are GMT. The time now is 04:17 AM.

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.01253 seconds
  • Memory Usage 1,798KB
  • 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
  • (8)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)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