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)
-   -   FAQ Edit v3 (https://vborg.vbsupport.ru/showthread.php?t=27733)

FleaBag 05-24-2002 12:13 AM

I'm really starting to get into this hacking lark, I might do something adventurous soon hehe.

geniuscrew 05-24-2002 12:16 AM

good luck lol

scsa20 05-24-2002 03:26 AM

Quote:

Originally posted by geniuscrew
Firstly do EXACTLY what it tells you in the instructions - don't run any queries mentioned in this thread or change bbparsecode2 to bbparsecode

simple replace this


Code:

$entries=$DB_site->query("SELECT entryid,title,text FROM faqentries WHERE faqid='$page' ORDER BY showorder");
with

Code:

$entries=$DB_site->query("SELECT * FROM faqentries WHERE faqid='$page' ORDER BY showorder");
(in misc.php)




That's what fixed mine :)

Hope that helped!

funny, I areadly had that code for along time when I first installed it, and when I put in a location for a images as {imagesfolder }/whatever.gif, it doesn't work and I take a look and it just shows {imagesfolder }/whatever :(.

should the following lines bechanged instead??

PHP Code:

$entry[text] = bbcodeparse2($entry[text],$entry[dohtml],$entry[dobbcode],$entry[dosmilies],$entry[dobbcode]); 

if so, to what...if that's not what I so'pose to change, then what?? :( I'm so lonely without that HTML praseing :(

Elentari 05-27-2002 12:29 AM

Ive installed this hack ... but now html is showing up as raw code on the FAQ page ... Ive tried fiddling with the codes as shown above, but it doesnt seem to be solving it. Any ideas?
My forum is at www.christiansurvivors.com/forums
the FAQ page is at http://www.christiansurvivors.com/fo...?s=&action=faq

Something else I noticed is that adding questions through the 'edit group' option, works fine - but using the add a question link directly from the left hand menu in user cp, it says its added the question, but it hasnt really!!

Hoping for some ideas!!
Thanks!

El xx

Elentari 05-27-2002 11:06 PM

Anyone??

I have since tried uninstalling and reinstalling, but ended up with exactly the same result!!! :p

edit : finally got it working!! uninstalled and installed AGAIN ... did exactly the same thing and it worked LOL!! Go figure ;)

Keyser S?ze 05-31-2002 05:14 PM

[QUOTE]Originally posted by GamerForums
OK, maybe this is just me but the code in admin/index.php isn't there either, so for anyone else - this is what I did.

Find...
PHP Code:

makenavselect("User Titles");
// *** 

Below that, add...
PHP Code:

makenavoption("Add Group","faq.php?action=addfaq","|");
makenavoption("Edit Group","faq.php?action=modify","<br>");
makenavoption("Add Question","faq.php?&action=addquestion");
makenavselect("FAQ Maintenance");
// *** 

...and that should have your CP sorted. :) Seems to be running fine on 2.2.5, thanks for the tip geniuscrew and thanks for the hack tubedogg. :D

Keyser S?ze 06-05-2002 04:55 AM

got this error msg Parse error: parse error in /usr/home/emusa/emusanet.com/public_html/forums/misc.php on line 147

but theres nothing on line 147

sigh, help pls

xeon 06-07-2002 04:36 PM

I dl'd the file in post one and did a clean install. I do not see any template additions when I run the faq_install.php, just the misc.php and index.php changes . I see the templates on page 3 of this post, but shouldn't these have been in the install file zip? Upon review with phpmyadmin, I see none of my templatestid's are 1, which is something I see in the install file in relation to the templates. The install script is looking for a templatestid #1.
Edit Update
I pulled the templates and put them in the long way, everything seems to be ok except for images are not working. I had to change the line mentioned in the prev. page to get html to parse, but images don't seem to be working. Changing the path to
<img src="/images/image.gif"> seem to do the trick though. This would have been easier if not for the template problem, which was my own. Very useful hack!

DudeSicko 06-12-2002 10:13 AM

The .zip on the 1 page, is that the upgraded version for 2.5 ore the newest version of the board ?

FleaBag 06-19-2002 07:54 PM

IceMalee; then you shall call him Matthew. Heh. ;)

Just upgraded to 2.2.6, working well with the fixes. :)

tpearl5 07-05-2002 03:56 AM

I'm having a small problem. I plan on using the Referrer Link located in the FAQ. However $userid does not parse. How do I get that link to display the correct referral link?

Dark_Wizard 08-06-2002 01:18 PM

Quote:

Originally posted by Elentari
Ive installed this hack ... but now html is showing up as raw code on the FAQ page ... Ive tried fiddling with the codes as shown above, but it doesnt seem to be solving it. Any ideas?
My forum is at www.christiansurvivors.com/forums
the FAQ page is at http://www.christiansurvivors.com/fo...?s=&action=faq

Something else I noticed is that adding questions through the 'edit group' option, works fine - but using the add a question link directly from the left hand menu in user cp, it says its added the question, but it hasnt really!!

Hoping for some ideas!!
Thanks!

El xx

Find this in misc.php:
PHP Code:

$title " &gt; &lt;a href='misc.php?s=$session[sessionhash]&action=faq&page=$faq[faqid]'&gt;$faq[title]&lt;/a&gt;"

replace with this:
PHP Code:

$title " &gt; <a href='misc.php?s=$session[sessionhash]&action=faq&page=$faq[faqid]'>$faq[title]</a>"


zachb 08-06-2002 07:26 PM

I got it working fine. Thanks for the hack, it's just what I needed. :)

tpearl5 08-11-2002 10:09 PM

I can get it to update the order of the faq entries.

I get this error at the top of the page:

Warning: Variable passed to each() is not an array or object in /mnt/web/guide/johnsworld/www/midi/board/admin/faq.php on line 347

FleaBag 09-04-2002 09:09 AM

Working on 2.2.7 with about 40 other hacks. :)

Erwin 09-05-2002 12:02 AM

This hack is brilliant - I've been using it for a while now. Remember to use the HTML/ bbcode fix a couple of pages back.

yzztik 09-12-2002 02:24 PM

Quote:

Originally posted by tpearl5
I can get it to update the order of the faq entries.

I get this error at the top of the page:

Warning: Variable passed to each() is not an array or object in /mnt/web/guide/johnsworld/www/midi/board/admin/faq.php on line 347

I am having the same problem. I dont think I get any error, it acts as if it update the order, but the numbers and previous order stays the same.

Any ideas? :(

Apok2002 09-15-2002 01:36 AM

I have custom headers w/ my themes, and the FAQ button got taken out (not intentionally). How do I get it back so I can use the FAQ again? What is the url I should use for the link, and where should I put it? Back in the header where the rest of the buttons to navigate thru the rest of the site are?

speedway 09-16-2002 11:29 AM

For all those fighting with the faq entries and not having things like $bbtitle, { imagesfolder } and maybe even $bbuserinfo[userid] parsing or showing correctly....

I *think* I have found a solution. Determined to get this working and thinking "hey, templates come from the DB so it should work...".

Anyway, enough ranting. I did this.

in misc.php AFTER

PHP Code:

$entry[text] = bbcodeparse2($entry[text],$entry[dohtml],$entry[dobbcode],$entry[dosmilies],$entry[dobbcode]); 

put

PHP Code:

      $entry[text]=addslashes($entry[text]);
      
$entry[text]=str_replace("\\'","'",$entry[text]);

      eval (
"\$entry[text] = \"$entry[text]\";"); 

and BINGO, all your variables will now contain a value....

Have fun. :bunny:

Download the attached text file and copy/paste over what you have in misc.php for the faq bit. The parsing code in vB is screwing up the new PHP bit.

FleaBag 09-17-2002 10:45 AM

OK slight problem I've noticed while running this hack on 2.2.7. If you look here... http://www.gamerforums.com/board/misc.php?s=&action=faq ... You'll see that the Groups have messed up HTML, the brackets e.t.c are included in the hyperlinks [look and you'll understand what I mean]. When I edit the groups, the formatting is fine - why would it be doing this? Anyone have any ideas? Thanks in advance. :)

speedway 09-17-2002 11:39 AM

Quote:

Originally posted by GamerForums
You'll see that the Groups have messed up HTML, the brackets e.t.c are included in the hyperlinks [look and you'll understand what I mean].
I haven't got a definate answer for this one however I would assume it has something to do with nested href's. If you look at the source it runs like this: <a ..............<a /a>.../a>. Now the question becomes "is this legal in HTML"?

On my board (yet to see the light of day) I have modifed this hack to have an additional title (called menutitle to be exact) that is used for "menu" parts of the display. The text in this column is just the question (no hyperlinks). The original title is then used on the "detail" part and does contain the hyperlinks. This then looks identical to the original template based version.

I may put this code up at a later date once I do the admin bit and check with Kevin that it is ok.

Sorry I couldn't be of more help.

NexDog 09-22-2002 12:35 PM

I'm running 2.2.6 and there is no FAQ mention AT ALL in misc.php. So how to replace this:
Code:

Find:

if ($action=="faq") {
$templatesused = ""; // Only one template used so load it when called
include("./global.php");
$page = intval($page);
if (!$page)
$page = '';
eval("dooutput(\"".gettemplate("faq$page")."\");");

}

Can I just add an entry anywhere in misc.php with the correct info?

speedway 09-22-2002 01:39 PM

suspect you are looking in yoursite/path-to-forum-if-any/admin/misc.php, not yoursite/path-to-forum-if-any/misc.php.

In a vanilla 2.2.6 yoursite/path-to-forum-if-any/misc.php it starts on line 96.

Oh, and don't forget to look at post #179 for the fix for variable parsing.

Cheers

NexDog 09-23-2002 04:25 AM

Damn, double files. What a crap idea. :D

Thanks man.

NexDog 09-23-2002 04:39 AM

Quote:

Originally posted by GamerForums
OK, maybe this is just me but the code in admin/index.php isn't there either, so for anyone else - this is what I did.

Find...
PHP Code:

makenavselect("User Titles");
// *** 

Below that, add...
PHP Code:

makenavoption("Add Group","faq.php?action=addfaq","|");
makenavoption("Edit Group","faq.php?action=modify","<br>");
makenavoption("Add Question","faq.php?&action=addquestion");
makenavselect("FAQ Maintenance");
// *** 

...and that should have your CP sorted. :) Seems to be running fine on 2.2.5, thanks for the tip geniuscrew and thanks for the hack tubedogg. :D

But I'm confused as the installer says:
Code:

admin/index.php

Find:

<a href="bbcode.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Modify </a>
</td></tr>

Just under that add:

<!-- FAQ addon -->
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("FAQs"); ?>
</table>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addquestion"> Add Question</a><br>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addfaq"> Add Group</a> |
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Edit</a>
</td></tr>
<!-- /FAQ addon -->

I see no "makenavoption" instructions at all. Also, thewre is no:

<a href="bbcode.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Modify </a>
</td></tr>

In my admin/index.php at least.....

NexDog 09-23-2002 09:42 PM

Bumpety bump. ;)

NexDog 09-23-2002 10:03 PM

Okay, i added:

Code:

PHP: 

makenavoption("Add Group","faq.php?action=addfaq","|");
makenavoption("Edit Group","faq.php?action=modify","<br>");
makenavoption("Add Question","faq.php?&action=addquestion");
makenavselect("FAQ Maintenance");
// ***

And it appears okay in the admin CP. But what about:
Code:

<!-- FAQ addon -->
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("FAQs"); ?>
</table>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addquestion"> Add Question</a><br>
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=addfaq"> Add Group</a> |
<a href="faq.php?s=<?php echo $session[sessionhash]; ?>&action=modify"> Edit</a>
</td></tr>
<!-- /FAQ addon -->

I guess they are one and the same? But why the wrong instructions?

Brad 09-23-2002 10:31 PM

Quote:

Originally posted by NexDog

I guess they are one and the same? But why the wrong instructions?

the way the admin cp handels links was changed some time ago, the hack was made for a older verson that still used html to make the links in the admin cp.

Elanor 09-26-2002 04:31 PM

In line ~94 I have removed "$sql" because I had trouble after installing 4Images with VB integration.

Original:
$query = "SELECT faqid,title FROM faq $sql ORDER BY showorder";

It's now:
$query = "SELECT faqid,title FROM faq ORDER BY showorder";

Everything works fine now, but I wonder if removing the $sql could cause any trouble in future (I know almost nothing about php/sql ^^; )

Just wanted to hear your opinion about this.

FleaBag 10-29-2002 08:40 PM

The code you need to find in misc.php in 2.2.8 isn't present, so I have to uninstall this hack. :( Anyone have any ideas? Thanks in advance...

DrkFusion 10-29-2002 08:41 PM

Hi, I installed this, and added a new faq catagory, but it isn't showing up in the faq. What is wrong?

Thanks for your help
-Arunan

Bad Bunny 02-14-2003 01:13 PM

I did a search for FAQ in the database, and this was the only result.
No offense, but the whole thread is filled with problems.

FleaBag 02-27-2003 10:43 PM

This hack is very out-dated, it's a shame not all hackers support their work [I realise this isn't manditory, but it would be nice].

Mike Gaidin 02-28-2003 12:27 AM

An update for this would be great.

Keyser S?ze 05-14-2003 05:56 PM

[QUOTE]02-27-03 at 10:27 PM Mike Gaidin said this in Post #194
An update for this would be great.

Remi 05-14-2003 07:24 PM

Quote:

02-28-03 at 03:27 AM Mike Gaidin said this in Post #194
An update for this would be great.



Yes I agree with that

S.Shady 05-21-2003 07:01 PM

considering how old this hack is im not surprised its not updated but is there any way to get this to work with vb 2.3.0 it works fine in the admin cp but when viewing the faq nothing shows up as was previously stated

PixelFx 06-05-2003 02:15 AM

tried installing on 2.30 heh no luck ...

Erwin 06-05-2003 03:08 AM

It works on 2.3.0. I've had this hack from when it was released, and just upgraded my vB, and it has kept on working.

Koutaru 06-08-2003 02:08 AM

After a couple minutes of code manipulation, I have it working in 2.3 :) very nice hack

I think all I did was

in misc.php
REPLACE
Code:

$faqs=$DB_site->query($query);
WITH
Code:

$faqs=$DB_site->query("SELECT faqid,title FROM faq $sql ORDER BY showorder");
DELETE

Code:

$query = "SELECT faqid,title FROM faq $sql ORDER BY showorder";


All times are GMT. The time now is 11:44 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.01996 seconds
  • Memory Usage 1,857KB
  • 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
  • (9)bbcode_code_printable
  • (9)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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