News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

zCommunity 0.8.1 Beta Now available! (supports SMF 2.0 RC1 and 1.1.8)

Started by Charles Hill, June 16, 2008, 03:33:34 PM

Previous topic - Next topic

abbyh

Can someone help me how to locate the Line 378 on my files? I don't know how.

Quote from: abbyh on February 28, 2009, 03:17:44 AM
I also got error message after installing zCommunity. My SMF version is 1.1.8. I upload first the _files file at my FTP and extract it in my cPanel. Have I done it right? Then install the smf_install file to my smf package manager. If I click the zCommunity control panel at my admin settings, this error appears..

Database Error
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation 'ifnull'
File: /home/abbyh/public_html/nlelp/zCommunity/Sources/ControlPanel.php
Line: 378 
Quote from: Charles Hill on February 28, 2009, 04:22:36 PM
This is a new one... I have yet to see this error, so I don't have a solution for you at the moment.

I think this error has something to do at PHPMy admin database. I hope somebody will help me figure it out.

abbyh

Resolved this myself.


Change all the character settings of all smf_blog_ tables at PHPMyAdmin from utf8_unicode_ci to utf8_general_ci. Obviously was a lot of work but everything's running correctly now and I can able to view the control panel of vCommunity.



I would like to ask one more help. How can I add a tab at the main menu bar so that users can click and access the Blog community right away?


LinK187

QuoteI would like to ask one more help. How can I add a tab at the main menu bar so that users can click and access the Blog community right away?

The answer to this questions may be a workaround suitable for my problem as well.

abbyh

My theme is Blackberry. I added this code at index.template.php and somehow adds a tab button lined up with the menu bars.

Don't know if it will work with the other templates. But for my site, this is good for the meantime.           

// Show the [blog] button.
               echo '<li><a' , $current_action=='blog' ? ' class="current"' : '' , ' href="', $scripturl, '?zc"><span>' , $txt['b1a'] , '</span></a></li>';


I added this before       // Show the [help] button.

LinK187

Quote from: abbyh on March 01, 2009, 10:42:52 AM
My theme is Blackberry. I added this code at index.template.php and somehow adds a tab button lined up with the menu bars.

Don't know if it will work with the other templates. But for my site, this is good for the meantime.           

// Show the [blog] button.
               echo '<li><a' , $current_action=='blog' ? ' class="current"' : '' , ' href="', $scripturl, '?zc"><span>' , $txt['b1a'] , '</span></a></li>';


I added this before       // Show the [help] button.

How does adding a comment effect anything at all?

Charles Hill

I believe abbyh was saying that he added:
// Show the [blog] button.
               echo '<li><a' , $current_action=='blog' ? ' class="current"' : '' , ' href="', $scripturl, '?zc"><span>' , $txt['b1a'] , '</span></a></li>';


Before the following:
      // Show the [help] button.


@ abbyh ... Thank you for sharing your solution with us (for the utf-8 problem you were experiencing)

Lamarck

One thing...will the template system change very much in 0.80beta?? I mean..If I make a custom template for 0.79alfa,will it work with the next version?. Just for wait until it's released or start working now.

Thanks.

Charles Hill

Quote from: Lamarck on March 01, 2009, 04:59:14 PM
One thing...will the template system change very much in 0.80beta?? I mean..If I make a custom template for 0.79alfa,will it work with the next version?. Just for wait until it's released or start working now.

Thanks.

The template system is remaining the same... the templates are changing a lot though... For example, I made a generic list template function which will now be used to display ALL of the lists in zCommunity.  Also, I made a generic form template which is used for almost all the forms.  The template_zc_sandwich functions have been changed slightly and are used in a lot more places.

LinK187

Quote from: Charles Hill on March 01, 2009, 01:28:21 PM
I believe abbyh was saying that he added:
// Show the [blog] button.
               echo '<li><a' , $current_action=='blog' ? ' class="current"' : '' , ' href="', $scripturl, '?zc"><span>' , $txt['b1a'] , '</span></a></li>';


Before the following:
      // Show the [help] button.


@ abbyh ... Thank you for sharing your solution with us (for the utf-8 problem you were experiencing)

The attached screen shot is what happens when I use that code.

LinK187

Additional issues:

Visual:
-The Blog Control Panel does not look like a link and i doubt my users would clue in. I would like to make it underlined and diff color. (see attached screen shot)
-The "blogs" button is messed up (see prev post)

Major Malfunction: Any time a new article or comment is posted, the user (regardless of member group) gets an error saying the title can't be blank or the comment can't be blank, after retyping the blog/comment it then works.

I also have several of this error in the forum error log:
Quoteglobalmod   Today at 12:29:28 PM 
*.*.*.*     385e4d55419ede35092fd6f6837ac4ce 
http://****/****/index.php?zc=post;blog=3;article 
8: Undefined index: rand_string
File: /home/****/public_html/****/****/zCommunity/Sources/Post.php
Line: 498

jkrlvgn

@LinK187:  Quick question on your menu problem.  Are you using SMF 2.0?  If so, then you need to modify the "Subs.php" to add on to the menu up at the top for your theme.

As far as the issue with not knowing a link from another link:  ...I can guarantee you that unless your users are stupid (god hopes that they're not), they'll move their mouse over where it says "Blog Control Panel".  It will clearly be a link when their cursor changes form an arrow to the hand (or whatever else their mouse might change into).  You can go into the source code and customize the link yourself pretty easily, if you want it to be underlined and a different color.

LinK187

Quote from: jkrlvgn on March 02, 2009, 03:34:49 PM
@LinK187:  Quick question on your menu problem.  Are you using SMF 2.0?  If so, then you need to modify the "Subs.php" to add on to the menu up at the top for your theme.

1.1.8

QuoteAs far as the issue with not knowing a link from another link:  ...I can guarantee you that unless your users are stupid (god hopes that they're not), they'll move their mouse over where it says "Blog Control Panel".  It will clearly be a link when their cursor changes form an arrow to the hand (or whatever else their mouse might change into).  You can go into the source code and customize the link yourself pretty easily, if you want it to be underlined and a different color.

Clearly you don't administrate any public sites. I had to stare and scavenge for it and I'm the admin. 90% of my users will be oblivious. I just want to know what value to change and in which file to look for it.

jkrlvgn

Mmk.  Give me the theme name, then, too, and I'll upload and give you exact instructions on what to do with what.

LinK187

Quote from: jkrlvgn on March 02, 2009, 03:43:55 PM
Mmk.  Give me the theme name, then, too, and I'll upload and give you exact instructions on what to do with what.

It's a hybrid of multiple themes. I can attach a zip or rar of the theme folder if you need it.

jkrlvgn

Yes, then.  give me access to the theme so that I can make it work for you.

LinK187

I will post a rar of the folder and you can post the modifications required. That way I know what has been done and how to modify in the future if need be. Will upload soon, just need to finish a few other things first.

LinK187

Attached is the theme folder. I've pmed you the pw to unrar it.

jkrlvgn

Open up your index.template.php file in your LondonBass theme.

Code (Search For) Select

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td align="center" valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';


Code (Add Underneath) Select

// Show the [blog] button.
echo ($current_action=='blog' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td align="center" valign="top" class="maintab_' , $current_action == 'blog' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?zc">' , $txt['b1a'] , '</a>
</td>' , $current_action == 'blog' ? '<td class="maintab_active_' . $last . '"> </td>' : '';


Just to let you know, whenever you're dealing with a custom theme, you can usually handle the buttons by looking at how the other buttons are created.  Some themes do this much differently than others, so you want to really pay attention.

If you want to see it functioning, you can click here and you can see it with your theme.  The only errors I got were from mods I didn't install that you have installed (like mgallery and yshout).  Everything else was good.

---


As far as changing the link so that it shows underlined and somehow more obvious:

Open up the "style.css" file in your LondonBass theme folder.
Go to the very end of the file, and add the following:

Code (Add Me!) Select

#bcpnotice
{
color: red;
text-decoration: underline;
font-size: 15px;
}


Save and upload the file.

Go into the zCommunity folder on your server.
Go into the Languages folder.
Open the "index.english.php" file.
Code (Search for) Select

$txt['b3002'] = 'Blog Control Panel';


Code (Replace with) Select

$txt['b3002'] = '<div id="bcpnotice">Blog Control Panel</div>';



Easy peasy.  If you've modded the rest of the theme yourself, this should have been a breeze for you.  If there's a specific way that you want to show the BCP a little better, lemme know, and I'll make up some CSS code for you.

LinK187

Quote from: jkrlvgn on March 02, 2009, 05:44:20 PM
Open up your index.template.php file in your LondonBass theme.

Code (Search For) Select

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td align="center" valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';


Code (Add Underneath) Select

// Show the [blog] button.
echo ($current_action=='blog' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td align="center" valign="top" class="maintab_' , $current_action == 'blog' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?zc">' , $txt['b1a'] , '</a>
</td>' , $current_action == 'blog' ? '<td class="maintab_active_' . $last . '"> </td>' : '';


Just to let you know, whenever you're dealing with a custom theme, you can usually handle the buttons by looking at how the other buttons are created.  Some themes do this much differently than others, so you want to really pay attention.

If you want to see it functioning, you can click here and you can see it with your theme.  The only errors I got were from mods I didn't install that you have installed (like mgallery and yshout).  Everything else was good.

---


As far as changing the link so that it shows underlined and somehow more obvious:

Open up the "style.css" file in your LondonBass theme folder.
Go to the very end of the file, and add the following:

Code (Add Me!) Select

#bcpnotice
{
color: red;
text-decoration: underline;
font-size: 15px;
}


Save and upload the file.

Go into the zCommunity folder on your server.
Go into the Languages folder.
Open the "index.english.php" file.
Code (Search for) Select

$txt['b3002'] = 'Blog Control Panel';


Code (Replace with) Select

$txt['b3002'] = '<div id="bcpnotice">Blog Control Panel</div>';



Easy peasy.  If you've modded the rest of the theme yourself, this should have been a breeze for you.  If there's a specific way that you want to show the BCP a little better, lemme know, and I'll make up some CSS code for you.

Thx very much! Worked just as you said, except I chose #9EE255 instead of red so that it would go with the theme.

Now that my visual problems are solved, what about the error I mentioned in this post: http://www.simplemachines.org/community/index.php?topic=244848.msg1958147#msg1958147

Any help is much appreciated.

jkrlvgn

Actually, I goofed on something.  *LOL*

Go to the zCommunity folder, and open up zc.php

Code (Search for) Select

// Blog Control Panel link...
if (!$user_info['is_guest'])
$context['zc']['extra_links'][] = '<a href="'. $scripturl .'?zc=bcp" rel="nofollow">' . $txt['b3002'] . '</a>';


Code (Replace with) Select

// Blog Control Panel link...
if (!$user_info['is_guest'])
$context['zc']['extra_links'][] = '<a href="'. $scripturl .'?zc=bcp" rel="nofollow">' . $txt['b30021'] . '</a>';


Save and upload.

Then go to the Languages folder, and open up index.english.php

Code (Search for) Select

$txt['b3002'] = '<div id="bcpnotice">Blog Control Panel</div>';


Code (Replace with) Select

$txt['b3002'] = 'Blog Control Panel';
$txt['b30021'] = '<div id="bcpnotice">Blog Control Panel</div>';


...trust me, it'll look goofy if you don't change that.


As far as your other error....I'm not getting that specific error at all. register at the link from the other post, and try it out, but I didn't get anything like that when I was using a test account.

Advertisement: