Home | Support Forums | Your Account | Gallery [2] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Viewtopic.php Issue

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Issues » Olympus (phpBB3) / Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
question

Beginner
Beginner


Joined: Jan 13, 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 9:51 am    Post subject: Viewtopic.php Issue Reply with quote

I am currently getting this error when I attempt to read a post.

Code: › Parse error: syntax error, unexpected T_ELSE in /home/.zwindler/astaradmin/allstarsportssoftball.com/viewtopic.php on line 168


Now this is the file where you had to make edits after the trigger_error portion which shows up numerous times within the file, but there were not instructions as to whether or not the edits should be done to all of the instances of this code or one of them or a specific one. Could you possibly look at my viewtopic.php file and tell me what the issue is? Thanks.
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Viewtopic.php Issue  

Back to top
question

Beginner
Beginner


Joined: Jan 13, 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 9:55 am    Post subject: Re: Viewtopic.php Issue Reply with quote

Line 168...

Code: ›
            // Check for global announcement correctness?
            if (!$row['forum_id'] && !$forum_id)
            {
               trigger_error('NO_TOPIC');
            }
// Grab Gallery link permission
$sql = 'SELECT link FROM ' . GALLERY2_TABLE;
$row = $db->sql_fetchrow($db->sql_query_limit($sql, 1));
$gallery_link = $row['link'];
            else if ($row['forum_id'])
            {
               $forum_id = $row['forum_id'];
            }
         }


This is apparently the chunk it is having an issue with. I tried to post the whole file but it is too long. I have the gallery link permission chunk of code after all instances of the trigger_error no topic piece...is this correct?
Back to top
Offline View user's profile Send private message
question

Beginner
Beginner


Joined: Jan 13, 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 10:12 am    Post subject: Re: Viewtopic.php Issue Reply with quote

Ok so I played with it some more and I think I have it working now.

I changed the below chunk to now have 3 } instead of only 2 like it had in my code above.

Code: ›
               $forum_id = $row['forum_id'];
            }
         }


Now looks like...

Code: ›
               $forum_id = $row['forum_id'];
            }
         }
     }


I can now view posts again.
Back to top
Offline View user's profile Send private message
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 955

PostPosted: Tue Jan 15, 2008 10:14 am    Post subject: Re: Viewtopic.php Issue Reply with quote

Actually the "trigger_error('NO_TOPIC');" only shows up once in the file with the same number of tabs in my editor, but I'll add some more surrounding code to the mod file for clarification. Also, the mod files go in order so once you apply a portion of the mod, you won't use it again in the same file.

You should remove all instances of the "// Grab Gallery link permissions" mod except the first one in the file; it should look like this:
Code: › // Do we have a topic or post id?
if (!$topic_id && !$post_id)
{
   trigger_error('NO_TOPIC');
}

// Grab Gallery link permission
$sql = 'SELECT link FROM ' . GALLERY2_TABLE;
$row = $db->sql_fetchrow($db->sql_query_limit($sql, 1));
$gallery_link = $row['link'];
Back to top
Offline View user's profile Send private message
question

Beginner
Beginner


Joined: Jan 13, 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 11:40 am    Post subject: Re: Viewtopic.php Issue Reply with quote

jettyrat wrote: › Actually the "trigger_error('NO_TOPIC');" only shows up once in the file with the same number of tabs in my editor, but I'll add some more surrounding code to the mod file for clarification. Also, the mod files go in order so once you apply a portion of the mod, you won't use it again in the same file.

You should remove all instances of the "// Grab Gallery link permissions" mod except the first one in the file; it should look like this:
Code: › // Do we have a topic or post id?
if (!$topic_id && !$post_id)
{
   trigger_error('NO_TOPIC');
}

// Grab Gallery link permission
$sql = 'SELECT link FROM ' . GALLERY2_TABLE;
$row = $db->sql_fetchrow($db->sql_query_limit($sql, 1));
$gallery_link = $row['link'];


That makes sense. At least I know that I can go ahead and remove those extra instances.

So when you search your viewtopic.php file you only find trigger_error('NO_TOPIC'); one time? That is odd.
Back to top
Offline View user's profile Send private message
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 955

PostPosted: Tue Jan 15, 2008 12:20 pm    Post subject: Re: Viewtopic.php Issue Reply with quote

I only find it one time with the same number of tabs as is in the mod file. The others are spaced differently...
Back to top
Offline View user's profile Send private message
question

Beginner
Beginner


Joined: Jan 13, 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 2:43 pm    Post subject: Re: Viewtopic.php Issue Reply with quote

jettyrat wrote: › I only find it one time with the same number of tabs as is in the mod file. The others are spaced differently...


Ah...now that explains it. I didnt search with the tabs...I only searched for the text itself.

Thanks for the clarification.
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Issues » Olympus (phpBB3) / Gallery 2 Integration View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSearch Engine OptimisationSearch Engine OptimizationWeb Design New YorkSEO Web DesignWeb hosting AustraliaSEO

6th year online! 2003-2008
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia