![]() |
1st Attachment of thread shown on Forum Summary Page.
I am attempting to code a hack that will do the following:
Basic (version 1 hopes) 1. Post the first attachment (graphic) of a thread ON the forum summary page. A more advanced example of what I hope to accomplish is found at cgtalk (here) but I am unable to get in contact with their web admin to find out how they did it. So I am attempting to do it myself. At present I have added the following code (NOT WORKING) to my forumdisplay.php file. Code:
// Aceman Thumbnail of attachment on forumdisplay page However this code returns the following mysql error message: Invalid SQL: SELECT postid FROM post WHERE threadid = LIMIT 1 mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 In threadbit TEMPLATE I put in the following code: Code:
<if condition=" forumid == 102 "> https://vborg.vbsupport.ru/archive/i...p/t-70628.html AND http://www.vbulletin.com/forum/showthread.php?t=118083 IF you can help me I would GREATLY APPRECIATE IT! Aceman |
try changing it to:
PHP Code:
|
I get two errors using this code:
Warning: getimagesize(): stream does not support seeking in /path/to/forums (the line it refers to is $sizes = getimagesize($avurl); ) and Unable to add cookies, header already sent. :( |
I no longer get the error message by using the code you indicated above.. (BTW! THANK YOU!) and the forum shows fine.. however no attachments show in the few test threads that I've made by adding..
<if condition=" forumid == 102 "> <!-- ACEMAN HACK --> <td class="alt1Active" align="$categoryalign" nowrap="nowrap">$imagethumb</td> <!-- END ACEMAN HACK --> </if> To the threadbit Template. |
I slept on it.. and well as my knowledge of calling variables is alittle lacking when it comes to VBulletin.. I'm currently "stumped".
Anyone have a suggestion? And too be honest.. the forumdisplay.php code (above) doesn't return any errors for me.. but I'm not sure if even that is working properly. I have considered adding a field to the POST creation page what will allow a member to upload a 80x80 thumbnail they created, and if they don't the server will make one..but I'm not sure which system is best.. I'm going to research using a forum to submit a thread. Aceman |
I'm going to make a movie.. "Desperately seeking Solution.. " :)
Do any of you coders out there have a clue why this would not work.. I'm beginning to think the code from forumdisplay.php is not correct.. because when I run a MySQL query : SELECT postid FROM post WHERE threadid="20624" AND username='".addslashes($thread['postusername'])."' ORDER BY dateline ASC I get an error message.. so I do not think the query has all the threadids..etc.. Aceman |
change $avurl to this
PHP Code:
|
AN-net - The code you indicated seems to be wrong as all the continuing code turns red. Is it possible that their is a " missing or something.. I"m plugging my way through php books at the moment.
Aceman |
I would be really interested in this one as well...
|
oh woops, it should be this:)
PHP Code:
|
All times are GMT. The time now is 01:41 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|